blob: 0a6bfe26db27e99c72e1c0b4ee620def96044424 [file] [log] [blame]
Felix Held0ffebac2021-02-05 22:26:00 +01001/* 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 Held08105382021-02-16 18:46:01 +01006#include <device/pciexp.h>
Felix Held0ffebac2021-02-05 22:26:00 +01007
8static 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 Held0ffebac2021-02-05 22:26:00 +010016static const struct pci_driver internal_pcie_gpp_driver __pci_driver = {
17 .ops = &internal_pcie_gpp_ops,
18 .vendor = PCI_VENDOR_ID_AMD,
Felix Heldabeecec2021-02-16 18:42:15 +010019 .device = PCI_DEVICE_ID_AMD_FAM17H_MODEL60H_PCIE_GPP_BUSABC,
Felix Held0ffebac2021-02-05 22:26:00 +010020};
Felix Held08105382021-02-16 18:46:01 +010021
22static 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
30static 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
36static 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};