Patrick Georgi | 02363b5 | 2020-05-05 20:48:50 +0200 | [diff] [blame] | 1 | /* This file is part of the coreboot project. */ |
Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame^] | 2 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Uwe Hermann | 9da69f8 | 2007-11-30 02:08:26 +0000 | [diff] [blame] | 3 | |
| 4 | #include <stdint.h> |
Uwe Hermann | 9da69f8 | 2007-11-30 02:08:26 +0000 | [diff] [blame] | 5 | #include <device/device.h> |
| 6 | #include <device/pci.h> |
| 7 | #include <device/pci_ids.h> |
| 8 | #include "i82371eb.h" |
| 9 | |
| 10 | /** |
| 11 | * Initialize the USB (UHCI) controller. |
| 12 | * |
| 13 | * Depending on the configuration variable 'usb_enable', enable or |
| 14 | * disable the USB (UHCI) controller. |
| 15 | * |
| 16 | * @param dev The device to use. |
| 17 | */ |
| 18 | static void usb_init(struct device *dev) |
| 19 | { |
| 20 | /* TODO: No special init needed? */ |
| 21 | } |
| 22 | |
| 23 | static const struct device_operations usb_ops = { |
| 24 | .read_resources = pci_dev_read_resources, |
| 25 | .set_resources = pci_dev_set_resources, |
| 26 | .enable_resources = pci_dev_enable_resources, |
| 27 | .init = usb_init, |
Uwe Hermann | 9da69f8 | 2007-11-30 02:08:26 +0000 | [diff] [blame] | 28 | .ops_pci = 0, /* No subsystem IDs on 82371EB! */ |
| 29 | }; |
| 30 | |
Patrick Georgi | 17dda3a | 2020-03-03 17:05:25 +0000 | [diff] [blame] | 31 | /* Note: No USB on 82371FB/MX (PIIX/MPIIX) and 82437MX. */ |
| 32 | |
| 33 | /* Intel 82371SB (PIIX3) */ |
| 34 | static const struct pci_driver usb_driver_sb __pci_driver = { |
| 35 | .ops = &usb_ops, |
| 36 | .vendor = PCI_VENDOR_ID_INTEL, |
| 37 | .device = PCI_DEVICE_ID_INTEL_82371SB_USB, |
| 38 | }; |
| 39 | |
Uwe Hermann | 9da69f8 | 2007-11-30 02:08:26 +0000 | [diff] [blame] | 40 | /* Intel 82371AB/EB/MB (PIIX4/PIIX4E/PIIX4M) */ |
| 41 | /* The 440MX (82443MX) consists of 82443BX + 82371EB (uses same PCI IDs). */ |
| 42 | static const struct pci_driver usb_driver_ab_eb_mb __pci_driver = { |
| 43 | .ops = &usb_ops, |
| 44 | .vendor = PCI_VENDOR_ID_INTEL, |
| 45 | .device = PCI_DEVICE_ID_INTEL_82371AB_USB, |
| 46 | }; |