From b171f768127d9bbc377ba97fd097ba0dcd4e148d Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 5 Oct 2022 22:12:02 +0200 Subject: 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 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/68147 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Fred Reitberger --- src/soc/amd/common/block/pci/pcie_gpp.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'src/soc/amd/common/block') 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 #include #include -#include #include #include #include @@ -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, -}; -- cgit v1.2.3