Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 2 | |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 3 | #include <device/device.h> |
| 4 | #include <device/pci.h> |
| 5 | #include <device/pci_ids.h> |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 6 | #include <device/pci_ehci.h> |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 7 | #include "hudson.h" |
| 8 | |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 9 | static void usb_init(struct device *dev) |
| 10 | { |
| 11 | } |
| 12 | |
| 13 | static struct device_operations usb_ops = { |
| 14 | .read_resources = pci_ehci_read_resources, |
| 15 | .set_resources = pci_dev_set_resources, |
| 16 | .enable_resources = pci_dev_enable_resources, |
| 17 | .init = usb_init, |
Angel Pons | 1fc0edd | 2020-05-31 00:03:28 +0200 | [diff] [blame] | 18 | .ops_pci = &pci_dev_ops_pci, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 19 | }; |
| 20 | |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 21 | static const unsigned short pci_device_ids[] = { |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame] | 22 | PCI_DEVICE_ID_AMD_SB900_USB_18_0, |
| 23 | PCI_DEVICE_ID_AMD_SB900_USB_18_2, |
| 24 | PCI_DEVICE_ID_AMD_SB900_USB_20_5, |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 25 | PCI_DEVICE_ID_AMD_CZ_USB_0, |
| 26 | PCI_DEVICE_ID_AMD_CZ_USB_1, |
zbao | b0c6817 | 2015-08-26 22:29:07 -0400 | [diff] [blame] | 27 | PCI_DEVICE_ID_AMD_CZ_USB3_0, |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 28 | 0 |
| 29 | }; |
| 30 | |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 31 | static const struct pci_driver usb_0_driver __pci_driver = { |
| 32 | .ops = &usb_ops, |
| 33 | .vendor = PCI_VENDOR_ID_AMD, |
WANG Siyuan | f2dfef0 | 2015-05-20 14:41:01 +0800 | [diff] [blame] | 34 | .devices = pci_device_ids, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 35 | }; |