nb/amd/pi/00730F01: assign northbridge ops in chipset devicetree

Since the northbridge is always function 0 of device 0 on bus 0, the
device operations can be statically assigned in the devicetree and
there's no need to bind the northbridge 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: Ia7faaa468ff77e05c378c5555622c3584cfe3f81
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79104
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Felix Held
2023-11-16 16:06:49 +01:00
parent 83e9f04802
commit 7b9c647217
2 changed files with 4 additions and 8 deletions

View File

@@ -7,7 +7,9 @@ chip northbridge/amd/pi/00730F01
device domain 0 on device domain 0 on
ops amd_fam16_mod30_pci_domain_ops ops amd_fam16_mod30_pci_domain_ops
device pci 0.0 alias gnb on end 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 end
device pci 1.0 alias gfx off end device pci 1.0 alias gfx off end
device pci 1.1 alias gfx_hda off end device pci 1.1 alias gfx_hda off end

View File

@@ -633,7 +633,7 @@ static unsigned long agesa_write_acpi_tables(const struct device *device,
return current; return current;
} }
static struct device_operations northbridge_operations = { struct device_operations amd_pi_northbridge_ops = {
.read_resources = nb_read_resources, .read_resources = nb_read_resources,
.set_resources = nb_set_resources, .set_resources = nb_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
@@ -643,12 +643,6 @@ static struct device_operations northbridge_operations = {
.write_acpi_tables = agesa_write_acpi_tables, .write_acpi_tables = agesa_write_acpi_tables,
}; };
static const struct pci_driver family16_northbridge __pci_driver = {
.ops = &northbridge_operations,
.vendor = PCI_VID_AMD,
.device = PCI_DID_AMD_16H_MODEL_303F_NB_HT,
};
static void fam16_finalize(void *chip_info) static void fam16_finalize(void *chip_info)
{ {
struct device *dev; struct device *dev;