based on patch from Andreas Tobler
Signed-off-by: Amadeusz Sławiński amade@asmblr.net CC: Andreas Tobler andreast@fgznet.ch --- drivers/macio.c | 14 +++++++++++++- drivers/pci.c | 6 +++--- 2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/macio.c b/drivers/macio.c index 03d5678..25294e5 100644 --- a/drivers/macio.c +++ b/drivers/macio.c @@ -183,11 +183,23 @@ openpic_init(const char *path, phys_addr_t addr) target_node = find_dev("/pci/mac-io/escc/ch-b"); set_int_property(target_node, "interrupt-parent", dnode);
+ target_node = find_dev("/pci/mac-io/ata-1"); + set_int_property(target_node, "interrupt-parent", dnode); + + target_node = find_dev("/pci/mac-io/ata-2"); + set_int_property(target_node, "interrupt-parent", dnode); + + target_node = find_dev("/pci/mac-io/ata-3"); + set_int_property(target_node, "interrupt-parent", dnode); + + target_node = find_dev("/pci/mac-io/via-cuda"); + set_int_property(target_node, "interrupt-parent", dnode); + target_node = find_dev("/pci"); set_int_property(target_node, "interrupt-parent", dnode);
interrupt_map = (u32 *)get_property(target_node, "interrupt-map", &len); - for (i = 0; i < 4; i++) { + for (i = 0; i < 8; i++) { interrupt_map[(i * 7) + PCI_INT_MAP_PIC_HANDLE] = (u32)dnode; } set_property(target_node, "interrupt-map", (char *)interrupt_map, len); diff --git a/drivers/pci.c b/drivers/pci.c index d6c5e51..b3be3cd 100644 --- a/drivers/pci.c +++ b/drivers/pci.c @@ -375,7 +375,7 @@ static void pci_host_set_interrupt_map(const pci_config_t *config) */ #if defined(CONFIG_PPC) phandle_t dev = get_cur_dev(); - u32 props[7 * 4]; + u32 props[7 * 8]; int i;
#if defined(CONFIG_PPC) @@ -384,7 +384,7 @@ static void pci_host_set_interrupt_map(const pci_config_t *config) return; #endif
- for (i = 0; i < (7*4); i+=7) { + for (i = 0; i < (7*8); i+=7) { props[i+PCI_INT_MAP_PCI0] = 0; props[i+PCI_INT_MAP_PCI1] = 0; props[i+PCI_INT_MAP_PCI2] = 0; @@ -393,7 +393,7 @@ static void pci_host_set_interrupt_map(const pci_config_t *config) props[i+PCI_INT_MAP_PIC_INT] = arch->irqs[i / 7]; props[i+PCI_INT_MAP_PIC_POL] = 3; } - set_property(dev, "interrupt-map", (char *)props, 7 * 4 * sizeof(props[0])); + set_property(dev, "interrupt-map", (char *)props, 7 * 8 * sizeof(props[0]));
props[PCI_INT_MAP_PCI0] = 0; props[PCI_INT_MAP_PCI1] = 0;