aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-12-14 15:13:26 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-20 00:37:47 -0500
commit6f67f9d26fe5ced50f716e9620b42c0721d8b8d9 (patch)
treee03f4476dba4782c86dd5749ae3d3a36f35a7845
parent3cd7613e25ffc0a76080045e179f984a32208829 (diff)
[POWERPC] Workaround oldworld OF bug with IRQs & P2P bridges
On some oldworld PowerMacs, OF doesn't assign interrupts properly beyond P2P bridges. Fortunately, the fix is easy as all those machines just wire all IRQ lines together to one IRQ which is assigned to the bridge itself. We already have a special function for parsing Apple OldWorld interrupts which are special, so let's add to it the ability to walk up the PCI tree to find interrupts. This fixes irqs on the lower slots of s900 clones among others. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/prom_parse.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 0dfbe1cd28eb..12c51e4ad2b4 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -920,9 +920,20 @@ static int of_irq_map_oldworld(struct device_node *device, int index,
920 920
921 /* 921 /*
922 * Old machines just have a list of interrupt numbers 922 * Old machines just have a list of interrupt numbers
923 * and no interrupt-controller nodes. 923 * and no interrupt-controller nodes. We also have dodgy
924 * cases where the APPL,interrupts property is completely
925 * missing behind pci-pci bridges and we have to get it
926 * from the parent (the bridge itself, as apple just wired
927 * everything together on these)
924 */ 928 */
925 ints = get_property(device, "AAPL,interrupts", &intlen); 929 while (device) {
930 ints = get_property(device, "AAPL,interrupts", &intlen);
931 if (ints != NULL)
932 break;
933 device = device->parent;
934 if (device && strcmp(device->type, "pci") != 0)
935 break;
936 }
926 if (ints == NULL) 937 if (ints == NULL)
927 return -EINVAL; 938 return -EINVAL;
928 intlen /= sizeof(u32); 939 intlen /= sizeof(u32);