Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 3 | |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 4 | #include <device/device.h> |
| 5 | #include <device/pci.h> |
| 6 | #include <device/pci_ids.h> |
Kyösti Mälkki | e2227a2 | 2014-02-05 13:02:55 +0200 | [diff] [blame] | 7 | #include <device/pci_ehci.h> |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 8 | #include "hudson.h" |
| 9 | |
| 10 | static struct pci_operations lops_pci = { |
| 11 | .set_subsystem = pci_dev_set_subsystem, |
| 12 | }; |
| 13 | |
| 14 | static void usb_init(struct device *dev) |
| 15 | { |
| 16 | } |
| 17 | |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 18 | static struct device_operations usb_ops = { |
Kyösti Mälkki | fb387df | 2013-06-07 22:16:52 +0300 | [diff] [blame] | 19 | .read_resources = pci_ehci_read_resources, |
| 20 | .set_resources = pci_dev_set_resources, |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 21 | .enable_resources = pci_dev_enable_resources, |
| 22 | .init = usb_init, |
| 23 | .scan_bus = 0, |
| 24 | .ops_pci = &lops_pci, |
| 25 | }; |
| 26 | |
| 27 | static const struct pci_driver usb_0_driver __pci_driver = { |
| 28 | .ops = &usb_ops, |
| 29 | .vendor = PCI_VENDOR_ID_AMD, |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame] | 30 | .device = PCI_DEVICE_ID_AMD_SB900_USB_18_0, |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 31 | }; |
Kyösti Mälkki | d61d07b | 2016-11-19 22:38:13 +0200 | [diff] [blame] | 32 | |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 33 | static const struct pci_driver usb_1_driver __pci_driver = { |
| 34 | .ops = &usb_ops, |
| 35 | .vendor = PCI_VENDOR_ID_AMD, |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame] | 36 | .device = PCI_DEVICE_ID_AMD_SB900_USB_18_2, |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 37 | }; |
| 38 | |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 39 | static const struct pci_driver usb_4_driver __pci_driver = { |
| 40 | .ops = &usb_ops, |
| 41 | .vendor = PCI_VENDOR_ID_AMD, |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame] | 42 | .device = PCI_DEVICE_ID_AMD_SB900_USB_20_5, |
zbao | 246e84b | 2012-07-13 18:47:03 +0800 | [diff] [blame] | 43 | }; |