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-or-later */
2 
3 #include <device/device.h>
4 #include <device/pci.h>
5 #include <device/pci_ids.h>
6 #include "i82371eb.h"
7 
8 /**
9  * Initialize the USB (UHCI) controller.
10  *
11  * Depending on the configuration variable 'usb_enable', enable or
12  * disable the USB (UHCI) controller.
13  *
14  * @param dev The device to use.
15  */
16 static void usb_init(struct device *dev)
17 {
18  /* TODO: No special init needed? */
19 }
20 
21 static const struct device_operations usb_ops = {
23  .set_resources = pci_dev_set_resources,
24  .enable_resources = pci_dev_enable_resources,
25  .init = usb_init,
26  .ops_pci = 0, /* No subsystem IDs on 82371EB! */
27 };
28 
29 /* Note: No USB on 82371FB/MX (PIIX/MPIIX) and 82437MX. */
30 
31 /* Intel 82371SB (PIIX3) */
32 static const struct pci_driver usb_driver_sb __pci_driver = {
33  .ops = &usb_ops,
34  .vendor = PCI_VID_INTEL,
35  .device = PCI_DID_INTEL_82371SB_USB,
36 };
37 
38 /* Intel 82371AB/EB/MB (PIIX4/PIIX4E/PIIX4M) */
39 /* The 440MX (82443MX) consists of 82443BX + 82371EB (uses same PCI IDs). */
40 static const struct pci_driver usb_driver_ab_eb_mb __pci_driver = {
41  .ops = &usb_ops,
42  .vendor = PCI_VID_INTEL,
43  .device = PCI_DID_INTEL_82371AB_USB,
44 };
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_82371SB_USB
Definition: pci_ids.h:2193
#define PCI_DID_INTEL_82371AB_USB
Definition: pci_ids.h:2205
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
static const struct pci_driver usb_driver_sb __pci_driver
Definition: usb.c:32
static const struct device_operations usb_ops
Definition: usb.c:21
static void usb_init(struct device *dev)
Initialize the USB (UHCI) controller.
Definition: usb.c:16
void(* read_resources)(struct device *dev)
Definition: device.h:39
Definition: device.h:107