diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-10-05 22:12:02 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-10-13 19:43:10 +0000 |
commit | b171f768127d9bbc377ba97fd097ba0dcd4e148d (patch) | |
tree | e7e93b0bd3984f392b4e003dcd401a8a513f78a8 /src/soc/amd/common/block | |
parent | 987ec8837ac8c5288a92af52c9bdd51f9019db3c (diff) |
soc/amd/*: Hook up GPP bridges ops to devicetree
This removes the need for a PCI driver.
Change-Id: I8e235d25622d0bd3f1bb3f18ec0400a02f674a6d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68147
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r-- | src/soc/amd/common/block/pci/pcie_gpp.c | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/soc/amd/common/block/pci/pcie_gpp.c b/src/soc/amd/common/block/pci/pcie_gpp.c index 2e37935da4..0ce3268501 100644 --- a/src/soc/amd/common/block/pci/pcie_gpp.c +++ b/src/soc/amd/common/block/pci/pcie_gpp.c @@ -7,7 +7,6 @@ #include <assert.h> #include <device/device.h> #include <device/pci.h> -#include <device/pci_ids.h> #include <device/pciexp.h> #include <soc/pci_devs.h> #include <stdio.h> @@ -48,7 +47,7 @@ static void acpi_device_write_gpp_pci_dev(const struct device *dev) acpigen_pop_len(); /* Scope */ } -static struct device_operations internal_pcie_gpp_ops = { +struct device_operations amd_internal_pcie_gpp_ops = { .read_resources = pci_bus_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_bus_enable_resources, @@ -58,21 +57,7 @@ static struct device_operations internal_pcie_gpp_ops = { .acpi_fill_ssdt = acpi_device_write_gpp_pci_dev, }; -static const unsigned short internal_pci_gpp_ids[] = { - PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSA, - PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSB, - PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_BUSABC, - PCI_DID_AMD_FAM17H_MODELA0H_PCIE_GPP_BUSABC, - 0 -}; - -static const struct pci_driver internal_pcie_gpp_driver __pci_driver = { - .ops = &internal_pcie_gpp_ops, - .vendor = PCI_VID_AMD, - .devices = internal_pci_gpp_ids, -}; - -static struct device_operations external_pcie_gpp_ops = { +struct device_operations amd_external_pcie_gpp_ops = { .read_resources = pci_bus_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_bus_enable_resources, @@ -81,17 +66,3 @@ static struct device_operations external_pcie_gpp_ops = { .acpi_name = pcie_gpp_acpi_name, .acpi_fill_ssdt = acpi_device_write_gpp_pci_dev, }; - -static const unsigned short external_pci_gpp_ids[] = { - PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP, - PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_D1, - PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_D2, - PCI_DID_AMD_FAM17H_MODELA0H_PCIE_GPP, - 0 -}; - -static const struct pci_driver external_pcie_gpp_driver __pci_driver = { - .ops = &external_pcie_gpp_ops, - .vendor = PCI_VID_AMD, - .devices = external_pci_gpp_ids, -}; |