Skip to contentSkip to conversation

of: irq: Ignore disabled interrupt controllers

PATCH Applied Peter Crosthwaite 2 participants 5 messages Nov 28, 2013 – Dec 4, 2013 Device tree

lore
Share & tools
lore
#0 lore raw

cover of: irq: Ignore disabled interrupt controllers

Hi All,

These two patches support the case where an interrupt controller is marked as disabled. Patch 1 fixed the dts interrupt-map search logic to ignore disabled interrupt controllers. Patch 2 stops disabled interrupt controllers getting probed.

Peter Crosthwaite (2):
of: irq: Ignore disabled intc's when searching map
of: irq: Ignore disabled interrupt controllers

 drivers/of/irq.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 6 lines
1.8.4.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH 1/2 of: irq: Ignore disabled intc's when searching map

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.

---
 drivers/of/irq.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/of/irq.c +3 -0
index 786b0b4..22e414b 100644
@@ -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
 			 */
Signature · 6 lines
1.8.4.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

Re: [PATCH v1 1/2] of: irq: Ignore disabled intc's when searching map

Ping!

Quoted 29 lines · Peter Crosthwaite

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.

---
 drivers/of/irq.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/of/irq.c +3 -1
index 786b0b4..22e414b 100644
@@ -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
                         */
--
Quoted 2 lines

1.8.4.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

PATCH 2/2 of: irq: Ignore disabled interrupt controllers

In reply to Peter Crosthwaite

When searching the system for interrupt controllers, skip over any that are explicitly disabled.

This makes interrupt controllers consistent with regular devices, which can be marked as do-not-probe via the status = "disabled" dts property.

---
 drivers/of/irq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/of/irq.c +2 -1
index 22e414b..bf80268 100644
@@ -441,7 +441,8 @@ void __init of_irq_init(const struct of_device_id *matches)
 	INIT_LIST_HEAD(&intc_parent_list);
 
 	for_each_matching_node(np, matches) {
-		if (!of_find_property(np, "interrupt-controller", NULL))
+		if (!of_find_property(np, "interrupt-controller", NULL) ||
+				!of_device_is_available(np))
 			continue;
 		/*
 		 * Here, we allocate and populate an intc_desc with the node
Signature · 1 line
1.8.4.4
Applied
#4 lore raw
In reply to Peter Crosthwaite
Quoted 7 lines · Peter Crosthwaite

Hi All,

These two patches support the case where an interrupt controller is marked as disabled. Patch 1 fixed the dts interrupt-map search logic to ignore disabled interrupt controllers. Patch 2 stops disabled interrupt controllers getting probed.

Quoted 6 lines

Peter Crosthwaite (2):
of: irq: Ignore disabled intc's when searching map
of: irq: Ignore disabled interrupt controllers

 drivers/of/irq.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Applied both patches. Thanks.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html