* [PATCH v1 0/2] of: irq: Ignore disabled interrupt controllers
@ 2013-11-28 7:26 Peter Crosthwaite
2013-11-28 7:26 ` [PATCH v1 1/2] of: irq: Ignore disabled intc's when searching map Peter Crosthwaite
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Peter Crosthwaite @ 2013-11-28 7:26 UTC (permalink / raw)
To: grant-likely, devicetree, linux-kernel; +Cc: rob.herring
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(-)
--
1.8.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] of: irq: Ignore disabled intc's when searching map
2013-11-28 7:26 [PATCH v1 0/2] of: irq: Ignore disabled interrupt controllers Peter Crosthwaite
@ 2013-11-28 7:26 ` Peter Crosthwaite
2013-12-04 4:42 ` Peter Crosthwaite
2013-11-28 7:26 ` [PATCH v1 2/2] of: irq: Ignore disabled interrupt controllers Peter Crosthwaite
2013-12-04 19:24 ` [PATCH v1 0/2] " Rob Herring
2 siblings, 1 reply; 5+ messages in thread
From: Peter Crosthwaite @ 2013-11-28 7:26 UTC (permalink / raw)
To: grant-likely, devicetree, linux-kernel; +Cc: rob.herring
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>
---
drivers/of/irq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 786b0b4..22e414b 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -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
*/
--
1.8.4.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] of: irq: Ignore disabled interrupt controllers
2013-11-28 7:26 [PATCH v1 0/2] of: irq: Ignore disabled interrupt controllers Peter Crosthwaite
2013-11-28 7:26 ` [PATCH v1 1/2] of: irq: Ignore disabled intc's when searching map Peter Crosthwaite
@ 2013-11-28 7:26 ` Peter Crosthwaite
2013-12-04 19:24 ` [PATCH v1 0/2] " Rob Herring
2 siblings, 0 replies; 5+ messages in thread
From: Peter Crosthwaite @ 2013-11-28 7:26 UTC (permalink / raw)
To: grant-likely, devicetree, linux-kernel; +Cc: rob.herring
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.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
---
drivers/of/irq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 22e414b..bf80268 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -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
--
1.8.4.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/2] of: irq: Ignore disabled intc's when searching map
2013-11-28 7:26 ` [PATCH v1 1/2] of: irq: Ignore disabled intc's when searching map Peter Crosthwaite
@ 2013-12-04 4:42 ` Peter Crosthwaite
0 siblings, 0 replies; 5+ messages in thread
From: Peter Crosthwaite @ 2013-12-04 4:42 UTC (permalink / raw)
To: grant-likely, devicetree, linux-kernel; +Cc: Rob Herring
Ping!
On Thu, Nov 28, 2013 at 5:26 PM, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> 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>
> ---
> drivers/of/irq.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> index 786b0b4..22e414b 100644
> --- a/drivers/of/irq.c
> +++ b/drivers/of/irq.c
> @@ -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
> */
> --
> 1.8.4.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 0/2] of: irq: Ignore disabled interrupt controllers
2013-11-28 7:26 [PATCH v1 0/2] of: irq: Ignore disabled interrupt controllers Peter Crosthwaite
2013-11-28 7:26 ` [PATCH v1 1/2] of: irq: Ignore disabled intc's when searching map Peter Crosthwaite
2013-11-28 7:26 ` [PATCH v1 2/2] of: irq: Ignore disabled interrupt controllers Peter Crosthwaite
@ 2013-12-04 19:24 ` Rob Herring
2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2013-12-04 19:24 UTC (permalink / raw)
To: Peter Crosthwaite; +Cc: grant-likely, devicetree, linux-kernel, Rob Herring
On Thu, Nov 28, 2013 at 1:26 AM, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> 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(-)
Applied both patches. Thanks.
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-12-04 19:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28 7:26 [PATCH v1 0/2] of: irq: Ignore disabled interrupt controllers Peter Crosthwaite
2013-11-28 7:26 ` [PATCH v1 1/2] of: irq: Ignore disabled intc's when searching map Peter Crosthwaite
2013-12-04 4:42 ` Peter Crosthwaite
2013-11-28 7:26 ` [PATCH v1 2/2] of: irq: Ignore disabled interrupt controllers Peter Crosthwaite
2013-12-04 19:24 ` [PATCH v1 0/2] " Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).