of: irq: Ignore disabled interrupt controllers
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
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
@@ -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
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.
Signed-off-by Peter Crosthwaite <[email protected]>Acked-by Michal Simek <[email protected]>--- drivers/of/irq.c | 3 +++ 1 file changed, 3 insertions(+)drivers/of/irq.c +3
-1@@ -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
PATCH 2/2 of: irq: Ignore disabled interrupt controllers
In reply to Peter CrosthwaiteWhen 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
@@ -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
Rob Herring
AppliedQuoted 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 controllersdrivers/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