[PATCH maple] Fix new interrupt code (MPIC detection)
Segher Boessenkool
segher at kernel.crashing.org
Sat Jul 8 10:37:20 EST 2006
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 <segher at kernel.crashing.org>
Acked-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
Index: linux-powerpc/arch/powerpc/platforms/maple/setup.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/platforms/maple/setup.c 2006-07-03 19:38:29.597405696 +0200
+++ linux-powerpc/arch/powerpc/platforms/maple/setup.c 2006-07-03 19:56:28.469294976 +0200
@@ -221,10 +221,17 @@
* 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");
More information about the Linuxppc-dev
mailing list