coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
usb2.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6 #include <device/pci_ids.h>
7 #include <device/pci_ops.h>
8 #include <device/pci_ehci.h>
9 #include "i82801dx.h"
10 
11 static void usb2_init(struct device *dev)
12 {
13  printk(BIOS_DEBUG, "USB: Setting up controller.. ");
16  printk(BIOS_DEBUG, "done.\n");
17 }
18 
19 static struct device_operations usb2_ops = {
21  .set_resources = pci_dev_set_resources,
22  .enable_resources = pci_dev_enable_resources,
23  .init = usb2_init,
24  .enable = i82801dx_enable,
25 };
26 
27 /* 82801DB/DBM USB 2.0 */
28 static const struct pci_driver usb2_driver __pci_driver = {
29  .ops = &usb2_ops,
30  .vendor = PCI_VID_INTEL,
32 };
#define printk(level,...)
Definition: stdlib.h:16
void i82801dx_enable(struct device *dev)
Definition: i82801dx.c:8
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
Definition: pci_ops.h:180
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
#define PCI_COMMAND_INVALIDATE
Definition: pci_def.h:15
#define PCI_COMMAND_IO
Definition: pci_def.h:11
#define PCI_COMMAND_MASTER
Definition: pci_def.h:13
#define PCI_COMMAND_MEMORY
Definition: pci_def.h:12
#define PCI_COMMAND
Definition: pci_def.h:10
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691
#define pci_ehci_read_resources
Definition: pci_ehci.h:22
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
#define PCI_DID_INTEL_82801DB_EHCI
Definition: pci_ids.h:2283
void(* read_resources)(struct device *dev)
Definition: device.h:39
Definition: device.h:107
static struct device_operations usb2_ops
Definition: usb2.c:19
static void usb2_init(struct device *dev)
Definition: usb2.c:11
static const struct pci_driver usb2_driver __pci_driver
Definition: usb2.c:28