From d319a03bf87209b3914fdf2ede88a2161123b3eb Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Sat, 8 Jul 2006 02:37:23 +0200 Subject: [POWERPC] Fix new interrupt code (MPIC endianness) All U3/U4 based systems are big-endian, not all express it in their device trees. Signed-off-by: Segher Boessenkool Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/maple/setup.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/powerpc/platforms/maple/setup.c') diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index cb528c9de4c3..2ecea3b21c7c 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c @@ -252,6 +252,8 @@ static void __init maple_init_IRQ(void) /* XXX Maple specific bits */ flags |= MPIC_BROKEN_U3 | MPIC_WANTS_RESET; + /* All U3/U4 are big-endian, older SLOF firmware doesn't encode this */ + flags |= MPIC_BIG_ENDIAN; /* Setup the openpic driver. More device-tree junks, we hard code no * ISUs for now. I'll have to revisit some stuffs with the folks doing -- cgit v1.2.3 From 96278d21000568a9261f016e8b2569a95a2d4c9e Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Sat, 8 Jul 2006 02:37:20 +0200 Subject: [POWERPC] Fix new interrupt code (MPIC detection) As the code comment already says, the Maple device-tree is incorrect here; make the Linux code detect the correct thing, too. Signed-off-by: Segher Boessenkool Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/maple/setup.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'arch/powerpc/platforms/maple/setup.c') diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index 2ecea3b21c7c..57567dfb9819 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c @@ -221,10 +221,17 @@ static void __init maple_init_IRQ(void) * in Maple device-tree where the type of the controller is * open-pic and not interrupt-controller */ - for_each_node_by_type(np, "open-pic") { - mpic_node = np; - break; - } + + for_each_node_by_type(np, "interrupt-controller") + if (device_is_compatible(np, "open-pic")) { + mpic_node = np; + break; + } + if (mpic_node == NULL) + for_each_node_by_type(np, "open-pic") { + mpic_node = np; + break; + } if (mpic_node == NULL) { printk(KERN_ERR "Failed to locate the MPIC interrupt controller\n"); -- cgit v1.2.3