diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-11-16 16:17:21 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-12-19 13:11:53 +0000 |
commit | dda7793e53f514c7502c0b51e350eb8730a357b8 (patch) | |
tree | 803ad31cee47938688762f7428a584223b99d42e /src/northbridge | |
parent | 7b9c6472179dc7a688c7728e4371d0cde0e7791a (diff) |
nb/amd/pi/00730F01: assign IOMMU ops in chipset devicetree
Since the IOMMU is always function 2 of device 0 on bus 0, the device
operations can be statically assigned in the devicetree and there's no
need to bind the IOMMU device operations to the PCI device during
runtime via a list of PCI IDs.
TEST=PC Engines APU2 still boots and doesn't show any new problems
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I84e949500ee86e0fcb2d15791502f5e3e7127703
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79105
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/northbridge')
-rw-r--r-- | src/northbridge/amd/pi/00730F01/chipset.cb | 4 | ||||
-rw-r--r-- | src/northbridge/amd/pi/00730F01/iommu.c | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/northbridge/amd/pi/00730F01/chipset.cb b/src/northbridge/amd/pi/00730F01/chipset.cb index b63d9fd649..c03882cc61 100644 --- a/src/northbridge/amd/pi/00730F01/chipset.cb +++ b/src/northbridge/amd/pi/00730F01/chipset.cb @@ -10,7 +10,9 @@ chip northbridge/amd/pi/00730F01 device pci 0.0 alias gnb on ops amd_pi_northbridge_ops end - device pci 0.2 alias iommu off end + device pci 0.2 alias iommu off + ops amd_pi_iommu_ops + end device pci 1.0 alias gfx off end device pci 1.1 alias gfx_hda off end device pci 2.0 on end # Dummy device function, do not disable diff --git a/src/northbridge/amd/pi/00730F01/iommu.c b/src/northbridge/amd/pi/00730F01/iommu.c index 3c31db49f0..986c6faa15 100644 --- a/src/northbridge/amd/pi/00730F01/iommu.c +++ b/src/northbridge/amd/pi/00730F01/iommu.c @@ -21,15 +21,9 @@ static void iommu_read_resources(struct device *dev) res->flags = IORESOURCE_MEM; } -static struct device_operations iommu_ops = { +struct device_operations amd_pi_iommu_ops = { .read_resources = iommu_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .ops_pci = &pci_dev_ops_pci, }; - -static const struct pci_driver iommu_driver __pci_driver = { - .ops = &iommu_ops, - .vendor = PCI_VID_AMD, - .device = PCI_DID_AMD_16H_MODEL_303F_NB_IOMMU, -}; |