soc/amd/picasso/pcie_gpp: Remove duplication in pirq_data declaration
There is no reason to duplicate the table. BUG=b:170595019 BRANCH=zork TEST=boot zork with pci=nomsi and verify /proc/interrupts didn't change Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: Ief714266cdb1b4f89afd0d9e50238200b87687ef Reviewed-on: https://review.coreboot.org/c/coreboot/+/49367 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
parent
b5e27a81cc
commit
0052d05101
|
@ -42,20 +42,7 @@ static const struct pci_routing pci_routing_table[] = {
|
|||
* by amd/common/block/pci/amd_pci_util to write the PCI_INT_LINE register
|
||||
* to each PCI device.
|
||||
*/
|
||||
static struct pirq_struct pirq_data[] = {
|
||||
{ PCIE_GPP_0_DEVFN },
|
||||
{ PCIE_GPP_1_DEVFN },
|
||||
{ PCIE_GPP_2_DEVFN },
|
||||
{ PCIE_GPP_3_DEVFN },
|
||||
{ PCIE_GPP_4_DEVFN },
|
||||
{ PCIE_GPP_5_DEVFN },
|
||||
{ PCIE_GPP_6_DEVFN },
|
||||
{ PCIE_GPP_A_DEVFN },
|
||||
{ PCIE_GPP_B_DEVFN },
|
||||
};
|
||||
|
||||
_Static_assert(ARRAY_SIZE(pci_routing_table) == ARRAY_SIZE(pirq_data),
|
||||
"PCI and PIRQ tables must be the same size");
|
||||
static struct pirq_struct pirq_data[ARRAY_SIZE(pci_routing_table)];
|
||||
|
||||
static const struct pci_routing *get_pci_routing(unsigned int devfn)
|
||||
{
|
||||
|
@ -84,10 +71,9 @@ void populate_pirq_data(void)
|
|||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(pirq_data); ++i) {
|
||||
pirq = &pirq_data[i];
|
||||
pci_routing = get_pci_routing(pirq->devfn);
|
||||
if (!pci_routing)
|
||||
die("%s: devfn %u not found\n", __func__, pirq->devfn);
|
||||
pci_routing = &pci_routing_table[i];
|
||||
|
||||
pirq->devfn = pci_routing->devfn;
|
||||
for (size_t j = 0; j < 4; ++j) {
|
||||
irq_index = calculate_irq(pci_routing, j);
|
||||
|
||||
|
|
Loading…
Reference in New Issue