Since support for QEMU's 40p machine has been added there is now the possibility of having a PPC architecture where !is_newworld() and !is_oldworld() are both true.
Fix up a couple of instances in this logic that were preventing the generation of interrupt properties in the device tree for 40p machines.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- drivers/pci.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/pci.c b/drivers/pci.c index 7a174b4..3423a92 100644 --- a/drivers/pci.c +++ b/drivers/pci.c @@ -1237,13 +1237,11 @@ static void ob_pci_add_properties(phandle_t phandle, set_int_property(dev, "class-code", class_code << 8 | class_prog);
if (config->irq_pin) { - OLDWORLD(set_int_property(dev, "AAPL,interrupts", - config->irq_line)); -#if defined(CONFIG_SPARC64) - set_int_property(dev, "interrupts", config->irq_pin); -#else - NEWWORLD(set_int_property(dev, "interrupts", config->irq_pin)); -#endif + if (is_oldworld()) { + set_int_property(dev, "AAPL,interrupts", config->irq_line); + } else { + set_int_property(dev, "interrupts", config->irq_pin); + } }
set_int_property(dev, "min-grant", pci_config_read8(addr, PCI_MIN_GNT)); @@ -1848,8 +1846,9 @@ static phandle_t ob_pci_host_set_interrupt_map(phandle_t host) char *path, buf[256];
/* Oldworld macs do interrupt maps differently */ - if (!is_newworld()) + if (is_oldworld()) { return 0; + }
PCI_DPRINTF("setting up interrupt map for host %x\n", host); dnode = dt_iterate_type(0, "open-pic");