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 "hudson.h" |
| 7 | |
| 8 | static void pcie_init(struct device *dev) |
| 9 | { |
| 10 | } |
| 11 | |
| 12 | static struct pci_operations lops_pci = { |
| 13 | .set_subsystem = 0, |
| 14 | }; |
| 15 | |
| 16 | static struct device_operations pci_ops = { |
| 17 | .read_resources = pci_bus_read_resources, |
| 18 | .set_resources = pci_dev_set_resources, |
| 19 | .enable_resources = pci_bus_enable_resources, |
| 20 | .init = pcie_init, |
| 21 | .scan_bus = pci_scan_bridge, |
| 22 | .reset_bus = pci_bus_reset, |
| 23 | .ops_pci = &lops_pci, |
| 24 | }; |
| 25 | |
| 26 | static const struct pci_driver pciea_driver __pci_driver = { |
| 27 | .ops = &pci_ops, |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 28 | .vendor = PCI_VID_AMD, |
| 29 | .device = PCI_DID_AMD_SB900_PCIEA, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | static const struct pci_driver pcieb_driver __pci_driver = { |
| 33 | .ops = &pci_ops, |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 34 | .vendor = PCI_VID_AMD, |
| 35 | .device = PCI_DID_AMD_SB900_PCIEB, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 36 | }; |
| 37 | static const struct pci_driver pciec_driver __pci_driver = { |
| 38 | .ops = &pci_ops, |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 39 | .vendor = PCI_VID_AMD, |
| 40 | .device = PCI_DID_AMD_SB900_PCIEC, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 41 | }; |
| 42 | static const struct pci_driver pcied_driver __pci_driver = { |
| 43 | .ops = &pci_ops, |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 44 | .vendor = PCI_VID_AMD, |
| 45 | .device = PCI_DID_AMD_SB900_PCIED, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 46 | }; |