Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Uwe Hermann | 9da69f8 | 2007-11-30 02:08:26 +0000 | [diff] [blame] | 2 | |
Uwe Hermann | 9da69f8 | 2007-11-30 02:08:26 +0000 | [diff] [blame] | 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 = { |
| 22 | .read_resources = pci_dev_read_resources, |
| 23 | .set_resources = pci_dev_set_resources, |
| 24 | .enable_resources = pci_dev_enable_resources, |
| 25 | .init = usb_init, |
Uwe Hermann | 9da69f8 | 2007-11-30 02:08:26 +0000 | [diff] [blame] | 26 | .ops_pci = 0, /* No subsystem IDs on 82371EB! */ |
| 27 | }; |
| 28 | |
Patrick Georgi | 17dda3a | 2020-03-03 17:05:25 +0000 | [diff] [blame] | 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, |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 34 | .vendor = PCI_VID_INTEL, |
| 35 | .device = PCI_DID_INTEL_82371SB_USB, |
Patrick Georgi | 17dda3a | 2020-03-03 17:05:25 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
Uwe Hermann | 9da69f8 | 2007-11-30 02:08:26 +0000 | [diff] [blame] | 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, |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 42 | .vendor = PCI_VID_INTEL, |
| 43 | .device = PCI_DID_INTEL_82371AB_USB, |
Uwe Hermann | 9da69f8 | 2007-11-30 02:08:26 +0000 | [diff] [blame] | 44 | }; |