1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6 #include <device/pci_ops.h>
7 #include <device/pci_ids.h>
10 static void usb_init(struct device
*dev
)
12 /* USB Specification says the device must be Bus Master */
13 printk(BIOS_DEBUG
, "UHCI: Setting up controller.. ");
15 pci_or_config16(dev
, PCI_COMMAND
, PCI_COMMAND_MASTER
);
18 pci_write_config8(dev
, 0xca, 0x00);
20 // Yes. Another Erratum
21 pci_or_config8(dev
, 0xca, 1 << 0);
23 printk(BIOS_DEBUG
, "done.\n");
26 static struct device_operations usb_ops
= {
27 .read_resources
= pci_dev_read_resources
,
28 .set_resources
= pci_dev_set_resources
,
29 .enable_resources
= pci_dev_enable_resources
,
31 .enable
= i82801gx_enable
,
32 .ops_pci
= &pci_dev_ops_pci
,
35 /* 82801GB/GR/GDH/GBM/GHM/GU (ICH7/ICH7R/ICH7DH/ICH7-M/ICH7-M DH/ICH7-U) */
36 static const struct pci_driver i82801gb_usb1 __pci_driver
= {
38 .vendor
= PCI_VID_INTEL
,
42 /* 82801GB/GR/GDH/GBM/GHM/GU (ICH7/ICH7R/ICH7DH/ICH7-M/ICH7-M DH/ICH7-U) */
43 static const struct pci_driver i82801gb_usb2 __pci_driver
= {
45 .vendor
= PCI_VID_INTEL
,
49 /* 82801GB/GR/GDH/GBM/GHM/GU (ICH7/ICH7R/ICH7DH/ICH7-M/ICH7-M DH/ICH7-U) */
50 static const struct pci_driver i82801gb_usb3 __pci_driver
= {
52 .vendor
= PCI_VID_INTEL
,
56 /* 82801GB/GR/GDH/GBM/GHM/GU (ICH7/ICH7R/ICH7DH/ICH7-M/ICH7-M DH/ICH7-U) */
57 static const struct pci_driver i82801gb_usb4 __pci_driver
= {
59 .vendor
= PCI_VID_INTEL
,