of: irq: Ignore disabled intc's when searching map
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Thu, 28 Nov 2013 07:26:12 +0000 (23:26 -0800)
committerRob Herring <rob.herring@calxeda.com>
Wed, 4 Dec 2013 19:12:50 +0000 (13:12 -0600)
When searching the interrupt map, if a matched parent is disabled, just
ignore it and move on with the search.

This allows for specifying connection of a single device IRQ to
multiple interrupt controllers via the interrupt map schema. This change
allows for selection of the active interrupt controller via the already
existing status = "disabled" mechanism.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
drivers/of/irq.c

index 9876963ed7b3689640df809e797a614bf43f90b5..bf8026895c5e07e41c802f2ed1fb5775380edbaa 100644 (file)
@@ -217,6 +217,9 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
                                goto fail;
                        }
 
+                       if (!of_device_is_available(newpar))
+                               match = 0;
+
                        /* Get #interrupt-cells and #address-cells of new
                         * parent
                         */