diff options
author | Raul E Rangel <rrangel@chromium.org> | 2021-05-07 14:29:57 -0600 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-05-09 18:09:20 +0000 |
commit | 129d473b2dc994bbfef8a74d5a9471bcc0c56a00 (patch) | |
tree | d5871dca132f480d4a932f026357780ddb49a662 /src/soc | |
parent | 7502e10fdfe4085c5f7d03b0b29d0f7fb9b390fe (diff) |
soc/amd/picasso/pci_gpp: Switch to using acpigen_write_pci_GNB_PRT
We can now delete the picasso specific version.
BUG=b:184766519
TEST=Build zork and verify SSDT has not changed
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Ic79014e83c9ff63cc7a6757b16764ae23b36984f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/53935
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/picasso/pcie_gpp.c | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/src/soc/amd/picasso/pcie_gpp.c b/src/soc/amd/picasso/pcie_gpp.c index 15174f6f74..eabaa77c95 100644 --- a/src/soc/amd/picasso/pcie_gpp.c +++ b/src/soc/amd/picasso/pcie_gpp.c @@ -60,68 +60,6 @@ static const char *pcie_gpp_acpi_name(const struct device *dev) return NULL; } -static void acpigen_write_PRT(const struct device *dev) -{ - char link_template[] = "\\_SB.INTX"; - unsigned int irq_index; - - const struct pci_routing_info *pci_routing = get_pci_routing_info(dev->path.pci.devfn); - if (!pci_routing) { - printk(BIOS_ERR, "PCI routing table not found for %s\n", dev_path(dev)); - return; - } - - acpigen_write_method("_PRT", 0); - - /* If (PICM) */ - acpigen_write_if(); - acpigen_emit_namestring("PICM"); - - /* Return (Package{...}) */ - acpigen_emit_byte(RETURN_OP); - - acpigen_write_package(4); /* Package - APIC Routing */ - for (unsigned int i = 0; i < 4; ++i) { - irq_index = pci_calculate_irq(pci_routing, i); - - acpigen_write_package(4); - /* There is only one device attached to the bridge */ - acpigen_write_dword(0x0000FFFF); - acpigen_write_byte(i); - acpigen_write_byte(0); /* Source: GSI */ - /* GNB IO-APIC is located after the FCH IO-APIC */ - acpigen_write_dword(IO_APIC_INTERRUPTS + irq_index); - acpigen_pop_len(); - } - acpigen_pop_len(); /* Package - APIC Routing */ - - /* Else */ - acpigen_write_else(); - - /* Return (Package{...}) */ - acpigen_emit_byte(RETURN_OP); - - acpigen_write_package(4); /* Package - PIC Routing */ - for (unsigned int i = 0; i < 4; ++i) { - irq_index = pci_calculate_irq(pci_routing, i); - - link_template[8] = 'A' + (irq_index % 8); - - acpigen_write_package(4); - /* There is only one device attached to the bridge */ - acpigen_write_dword(0x0000FFFF); - acpigen_write_byte(i); - acpigen_emit_namestring(link_template); - acpigen_write_dword(0); - acpigen_pop_len(); - } - acpigen_pop_len(); /* Package - PIC Routing */ - - acpigen_pop_len(); /* End Else */ - - acpigen_pop_len(); /* Method */ -} - /* * This function writes a PCI device with _ADR, _STA, and _PRT objects: * Example: @@ -230,7 +168,7 @@ static void acpi_device_write_gpp_pci_dev(const struct device *dev) acpigen_write_ADR_pci_device(dev); acpigen_write_STA(acpi_device_status(dev)); - acpigen_write_PRT(dev); + acpigen_write_pci_GNB_PRT(dev); acpigen_pop_len(); /* Device */ acpigen_pop_len(); /* Scope */ |