coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
usb.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 "i82801dx.h"
9 
10 static void usb_init(struct device *dev)
11 {
12  printk(BIOS_DEBUG, "USB: Setting up controller.. ");
15  printk(BIOS_DEBUG, "done.\n");
16 }
17 
18 static struct device_operations usb_ops = {
20  .set_resources = pci_dev_set_resources,
21  .enable_resources = pci_dev_enable_resources,
22  .init = usb_init,
23  .enable = i82801dx_enable,
24 };
25 
26 /* 82801DB/DBL/DBM USB1 */
27 static const struct pci_driver usb_driver_1 __pci_driver = {
28  .ops = &usb_ops,
29  .vendor = PCI_VID_INTEL,
31 };
32 
33 /* 82801DB/DBL/DBM USB2 */
34 static const struct pci_driver usb_driver_2 __pci_driver = {
35  .ops = &usb_ops,
36  .vendor = PCI_VID_INTEL,
38 };
39 
40 /* 82801DB/DBL/DBM USB3 */
41 static const struct pci_driver usb_driver_3 __pci_driver = {
42  .ops = &usb_ops,
43  .vendor = PCI_VID_INTEL,
45 };
#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_read_resources(struct device *dev)
Definition: pci_device.c:534
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691
#define PCI_DID_INTEL_82801DB_USB1
Definition: pci_ids.h:2276
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
#define PCI_DID_INTEL_82801DB_USB2
Definition: pci_ids.h:2278
#define PCI_DID_INTEL_82801DB_USB3
Definition: pci_ids.h:2281
static struct device_operations usb_ops
Definition: usb.c:18
static const struct pci_driver usb_driver_1 __pci_driver
Definition: usb.c:27
static void usb_init(struct device *dev)
Definition: usb.c:10
void(* read_resources)(struct device *dev)
Definition: device.h:39
Definition: device.h:107