device: Move pci_irqs outside DEVTREE_EARLY

Only needed in ramstage, and only for MP tables.

Change-Id: Ia7c1e153b948aeefa4c3bea4920b02a91a417096
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33922
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2019-06-30 10:51:31 +03:00 committed by Martin Roth
parent 275f2e22a1
commit 1557a67c83
2 changed files with 12 additions and 13 deletions

View File

@ -126,7 +126,6 @@ struct device {
unsigned int on_mainboard : 1; unsigned int on_mainboard : 1;
unsigned int disable_pcie_aspm : 1; unsigned int disable_pcie_aspm : 1;
unsigned int hidden : 1; /* set if we should hide from UI */ unsigned int hidden : 1; /* set if we should hide from UI */
struct pci_irq_info pci_irq_info[4];
u8 command; u8 command;
/* Base registers for this device. I/O, MEM and Expansion ROM */ /* Base registers for this device. I/O, MEM and Expansion ROM */
@ -138,6 +137,7 @@ struct device {
DEVTREE_CONST struct bus *link_list; DEVTREE_CONST struct bus *link_list;
#if !DEVTREE_EARLY #if !DEVTREE_EARLY
struct pci_irq_info pci_irq_info[4];
struct device_operations *ops; struct device_operations *ops;
struct chip_operations *chip_ops; struct chip_operations *chip_ops;
const char *name; const char *name;

View File

@ -815,18 +815,6 @@ static void pass1(FILE *fil, struct device *ptr, struct device *next)
fprintf(fil, "\t.subsystem_vendor = 0x%04x,\n", fprintf(fil, "\t.subsystem_vendor = 0x%04x,\n",
ptr->subsystem_vendor); ptr->subsystem_vendor);
for (pin = 0; pin < 4; pin++) {
if (ptr->pci_irq_info[pin].ioapic_irq_pin > 0)
fprintf(fil,
"\t.pci_irq_info[%d].ioapic_irq_pin = %d,\n",
pin, ptr->pci_irq_info[pin].ioapic_irq_pin);
if (ptr->pci_irq_info[pin].ioapic_dst_id > 0)
fprintf(fil,
"\t.pci_irq_info[%d].ioapic_dst_id = %d,\n",
pin, ptr->pci_irq_info[pin].ioapic_dst_id);
}
if (ptr->subsystem_device > 0) if (ptr->subsystem_device > 0)
fprintf(fil, "\t.subsystem_device = 0x%04x,\n", fprintf(fil, "\t.subsystem_device = 0x%04x,\n",
ptr->subsystem_device); ptr->subsystem_device);
@ -843,6 +831,17 @@ static void pass1(FILE *fil, struct device *ptr, struct device *next)
if (ptr->sibling) if (ptr->sibling)
fprintf(fil, "\t.sibling = &%s,\n", ptr->sibling->name); fprintf(fil, "\t.sibling = &%s,\n", ptr->sibling->name);
fprintf(fil, "#if !DEVTREE_EARLY\n"); fprintf(fil, "#if !DEVTREE_EARLY\n");
for (pin = 0; pin < 4; pin++) {
if (ptr->pci_irq_info[pin].ioapic_irq_pin > 0)
fprintf(fil,
"\t.pci_irq_info[%d].ioapic_irq_pin = %d,\n",
pin, ptr->pci_irq_info[pin].ioapic_irq_pin);
if (ptr->pci_irq_info[pin].ioapic_dst_id > 0)
fprintf(fil,
"\t.pci_irq_info[%d].ioapic_dst_id = %d,\n",
pin, ptr->pci_irq_info[pin].ioapic_dst_id);
}
fprintf(fil, "\t.chip_ops = &%s_ops,\n", fprintf(fil, "\t.chip_ops = &%s_ops,\n",
chip_ins->chip->name_underscore); chip_ins->chip->name_underscore);
if (chip_ins == &mainboard_instance) if (chip_ins == &mainboard_instance)