Felix Held | 0ffebac | 2021-02-05 22:26:00 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
| 3 | #include <device/device.h> |
| 4 | #include <device/pci.h> |
| 5 | #include <device/pci_ids.h> |
Felix Held | 0810538 | 2021-02-16 18:46:01 +0100 | [diff] [blame] | 6 | #include <device/pciexp.h> |
Felix Held | 0ffebac | 2021-02-05 22:26:00 +0100 | [diff] [blame] | 7 | |
| 8 | static struct device_operations internal_pcie_gpp_ops = { |
| 9 | .read_resources = pci_bus_read_resources, |
| 10 | .set_resources = pci_dev_set_resources, |
| 11 | .enable_resources = pci_bus_enable_resources, |
| 12 | .scan_bus = pci_scan_bridge, |
| 13 | .reset_bus = pci_bus_reset, |
| 14 | }; |
| 15 | |
Felix Held | 0ffebac | 2021-02-05 22:26:00 +0100 | [diff] [blame] | 16 | static const struct pci_driver internal_pcie_gpp_driver __pci_driver = { |
| 17 | .ops = &internal_pcie_gpp_ops, |
| 18 | .vendor = PCI_VENDOR_ID_AMD, |
Felix Held | abeecec | 2021-02-16 18:42:15 +0100 | [diff] [blame] | 19 | .device = PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_PCIE_GPP_BUSABC, |
Felix Held | 0ffebac | 2021-02-05 22:26:00 +0100 | [diff] [blame] | 20 | }; |
Felix Held | 0810538 | 2021-02-16 18:46:01 +0100 | [diff] [blame] | 21 | |
| 22 | static struct device_operations external_pcie_gpp_ops = { |
| 23 | .read_resources = pci_bus_read_resources, |
| 24 | .set_resources = pci_dev_set_resources, |
| 25 | .enable_resources = pci_bus_enable_resources, |
| 26 | .scan_bus = pciexp_scan_bridge, |
| 27 | .reset_bus = pci_bus_reset, |
| 28 | }; |
| 29 | |
| 30 | static const unsigned short external_pci_gpp_ids[] = { |
| 31 | PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_PCIE_GPP_D1, |
| 32 | PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_PCIE_GPP_D2, |
| 33 | 0 |
| 34 | }; |
| 35 | |
| 36 | static const struct pci_driver external_pcie_gpp_driver __pci_driver = { |
| 37 | .ops = &external_pcie_gpp_ops, |
| 38 | .vendor = PCI_VENDOR_ID_AMD, |
| 39 | .devices = external_pci_gpp_ids, |
| 40 | }; |