diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-10-05 22:15:58 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-10-13 19:43:53 +0000 |
commit | 796a8f3dd36a72f6595089bc3d82fd7e5c6f8271 (patch) | |
tree | 5335ff425baee7bdd7f6eff573eafbd7095b2ccb | |
parent | b171f768127d9bbc377ba97fd097ba0dcd4e148d (diff) |
soc/amd/*: Hook up GPU ops in devicetree
This removes the need for a PCI driver.
Change-Id: I4b499013a80f5c1bd6ac265a5ae8e635598d9e6c
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/+/68148
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>
-rw-r--r-- | src/soc/amd/cezanne/chipset.cb | 2 | ||||
-rw-r--r-- | src/soc/amd/common/block/graphics/graphics.c | 19 | ||||
-rw-r--r-- | src/soc/amd/mendocino/chipset_mendocino.cb | 2 | ||||
-rw-r--r-- | src/soc/amd/mendocino/chipset_rembrandt.cb | 2 | ||||
-rw-r--r-- | src/soc/amd/morgana/chipset.cb | 2 | ||||
-rw-r--r-- | src/soc/amd/picasso/chipset.cb | 2 |
6 files changed, 6 insertions, 23 deletions
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb index 7fd207d4a7..a9bc2568a1 100644 --- a/src/soc/amd/cezanne/chipset.cb +++ b/src/soc/amd/cezanne/chipset.cb @@ -24,7 +24,7 @@ chip soc/amd/cezanne device pci 08.0 on end # Dummy Host Bridge, do not disable device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A ops amd_internal_pcie_gpp_ops - device pci 0.0 alias gfx off end # Internal GPU (GFX) + device pci 0.0 alias gfx off ops amd_graphics_ops end # Internal GPU (GFX) device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ) device pci 0.2 alias crypto off end # Crypto Coprocessor device pci 0.3 alias xhci_0 off diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index d39f60a85c..d3def7b23e 100644 --- a/src/soc/amd/common/block/graphics/graphics.c +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -4,7 +4,6 @@ #include <acpi/acpigen.h> #include <boot/coreboot_tables.h> #include <device/pci.h> -#include <device/pci_ids.h> #include <console/console.h> #include <fsp/graphics.h> #include <soc/intel/common/vbt.h> @@ -168,7 +167,7 @@ static void graphics_dev_init(struct device *const dev) pci_dev_init(dev); } -static const struct device_operations graphics_ops = { +const struct device_operations amd_graphics_ops = { .read_resources = pci_dev_read_resources, .set_resources = graphics_set_resources, .enable_resources = pci_dev_enable_resources, @@ -179,19 +178,3 @@ static const struct device_operations graphics_ops = { .acpi_fill_ssdt = graphics_fill_ssdt, .acpi_name = graphics_acpi_name, }; - -static const unsigned short pci_device_ids[] = { - PCI_DID_ATI_FAM17H_MODEL18H_GPU, - PCI_DID_ATI_FAM17H_MODEL60H_GPU, - PCI_DID_ATI_FAM17H_MODEL68H_GPU, - PCI_DID_ATI_FAM17H_MODELA0H_GPU, - PCI_DID_ATI_FAM19H_MODEL51H_GPU_CEZANNE, - PCI_DID_ATI_FAM19H_MODEL51H_GPU_BARCELO, - 0, -}; - -static const struct pci_driver graphics_driver __pci_driver = { - .ops = &graphics_ops, - .vendor = PCI_VID_ATI, - .devices = pci_device_ids, -}; diff --git a/src/soc/amd/mendocino/chipset_mendocino.cb b/src/soc/amd/mendocino/chipset_mendocino.cb index 6397ce93f3..2a8d1877ff 100644 --- a/src/soc/amd/mendocino/chipset_mendocino.cb +++ b/src/soc/amd/mendocino/chipset_mendocino.cb @@ -20,7 +20,7 @@ chip soc/amd/mendocino device pci 08.0 on end # Dummy Host Bridge, do not disable device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A ops amd_internal_pcie_gpp_ops - device pci 0.0 alias gfx off end # Internal GPU (GFX) + device pci 0.0 alias gfx off ops amd_graphics_ops end # Internal GPU (GFX) device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ) device pci 0.2 alias crypto off end # Crypto Coprocessor device pci 0.3 alias xhci_0 off diff --git a/src/soc/amd/mendocino/chipset_rembrandt.cb b/src/soc/amd/mendocino/chipset_rembrandt.cb index 6397ce93f3..2a8d1877ff 100644 --- a/src/soc/amd/mendocino/chipset_rembrandt.cb +++ b/src/soc/amd/mendocino/chipset_rembrandt.cb @@ -20,7 +20,7 @@ chip soc/amd/mendocino device pci 08.0 on end # Dummy Host Bridge, do not disable device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A ops amd_internal_pcie_gpp_ops - device pci 0.0 alias gfx off end # Internal GPU (GFX) + device pci 0.0 alias gfx off ops amd_graphics_ops end # Internal GPU (GFX) device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ) device pci 0.2 alias crypto off end # Crypto Coprocessor device pci 0.3 alias xhci_0 off diff --git a/src/soc/amd/morgana/chipset.cb b/src/soc/amd/morgana/chipset.cb index aa68f90562..8510981f4d 100644 --- a/src/soc/amd/morgana/chipset.cb +++ b/src/soc/amd/morgana/chipset.cb @@ -22,7 +22,7 @@ chip soc/amd/morgana device pci 08.0 on end # Dummy Host Bridge, do not disable device pci 08.1 alias gpp_bridge_a off # Internal GPP Bridge 0 to Bus A ops amd_internal_pcie_gpp_ops - device pci 0.0 alias gfx off end # Internal GPU (GFX) + device pci 0.0 alias gfx off ops amd_graphics_ops end # Internal GPU (GFX) device pci 0.1 alias gfx_hda off end # Display HD Audio Controller (GFXAZ) device pci 0.2 alias crypto off end # Crypto Coprocessor device pci 0.3 alias xhci_0 off diff --git a/src/soc/amd/picasso/chipset.cb b/src/soc/amd/picasso/chipset.cb index 097cbcf975..3b44d54725 100644 --- a/src/soc/amd/picasso/chipset.cb +++ b/src/soc/amd/picasso/chipset.cb @@ -19,7 +19,7 @@ chip soc/amd/picasso device pci 08.0 on end # Dummy Host Bridge, do not disable device pci 08.1 alias internal_bridge_a off # internal bridge to bus A ops amd_internal_pcie_gpp_ops - device pci 0.0 alias gfx off end # internal GPU + device pci 0.0 alias gfx off ops amd_graphics_ops end # internal GPU device pci 0.1 alias gfx_hda off end # display HD Audio controller device pci 0.2 alias crypto off end # cryptography coprocessor device pci 0.3 alias xhci_0 off end |