linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation
@ 2016-08-09 14:18 Philipp Zabel
  2016-08-09 14:18 ` [PATCH 2/2] ARM: imx6: mark GPC node as not populated after irq init to probe pm domain driver Philipp Zabel
  2016-08-09 16:30 ` [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation Jon Hunter
  0 siblings, 2 replies; 4+ messages in thread
From: Philipp Zabel @ 2016-08-09 14:18 UTC (permalink / raw)
  To: linux-arm-kernel

That way the init callback may clear the flag again, in case of drivers
split between early irq chip and a normal platform driver.

Fixes: 15cc2ed6dcf9 ("of/irq: Mark initialised interrupt controllers as populated")
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/of/irq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 89a71c6..a2e68f7 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -544,12 +544,15 @@ void __init of_irq_init(const struct of_device_id *matches)
 
 			list_del(&desc->list);
 
+			of_node_set_flag(desc->dev, OF_POPULATED);
+
 			pr_debug("of_irq_init: init %s (%p), parent %p\n",
 				 desc->dev->full_name,
 				 desc->dev, desc->interrupt_parent);
 			ret = desc->irq_init_cb(desc->dev,
 						desc->interrupt_parent);
 			if (ret) {
+				of_node_clear_flag(desc->dev, OF_POPULATED);
 				kfree(desc);
 				continue;
 			}
@@ -559,8 +562,6 @@ void __init of_irq_init(const struct of_device_id *matches)
 			 * its children can get processed in a subsequent pass.
 			 */
 			list_add_tail(&desc->list, &intc_parent_list);
-
-			of_node_set_flag(desc->dev, OF_POPULATED);
 		}
 
 		/* Get the next pending parent that might have children */
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ARM: imx6: mark GPC node as not populated after irq init to probe pm domain driver
  2016-08-09 14:18 [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation Philipp Zabel
@ 2016-08-09 14:18 ` Philipp Zabel
  2016-08-09 17:35   ` Rob Herring
  2016-08-09 16:30 ` [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation Jon Hunter
  1 sibling, 1 reply; 4+ messages in thread
From: Philipp Zabel @ 2016-08-09 14:18 UTC (permalink / raw)
  To: linux-arm-kernel

Since IRQCHIP_DECLARE now flags the GPC node as already populated, the
GPC power domain driver is never probed unless we clear the flag again.

Fixes: 15cc2ed6dcf9 ("of/irq: Mark initialised interrupt controllers as populated")
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Jon Hunter <jonathanh@nvidia.com>
---
 arch/arm/mach-imx/gpc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index fd87205..0df062d 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -271,6 +271,12 @@ static int __init imx_gpc_init(struct device_node *node,
 	for (i = 0; i < IMR_NUM; i++)
 		writel_relaxed(~0, gpc_base + GPC_IMR1 + i * 4);
 
+	/*
+	 * Clear the OF_POPULATED flag set in of_irq_init so that
+	 * later the GPC power domain driver will not be skipped.
+	 */
+	of_node_clear_flag(node, OF_POPULATED);
+
 	return 0;
 }
 IRQCHIP_DECLARE(imx_gpc, "fsl,imx6q-gpc", imx_gpc_init);
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation
  2016-08-09 14:18 [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation Philipp Zabel
  2016-08-09 14:18 ` [PATCH 2/2] ARM: imx6: mark GPC node as not populated after irq init to probe pm domain driver Philipp Zabel
@ 2016-08-09 16:30 ` Jon Hunter
  1 sibling, 0 replies; 4+ messages in thread
From: Jon Hunter @ 2016-08-09 16:30 UTC (permalink / raw)
  To: linux-arm-kernel


On 09/08/16 15:18, Philipp Zabel wrote:
> That way the init callback may clear the flag again, in case of drivers
> split between early irq chip and a normal platform driver.
> 
> Fixes: 15cc2ed6dcf9 ("of/irq: Mark initialised interrupt controllers as populated")
> Suggested-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Jon Hunter <jonathanh@nvidia.com>
> ---
>  drivers/of/irq.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> index 89a71c6..a2e68f7 100644
> --- a/drivers/of/irq.c
> +++ b/drivers/of/irq.c
> @@ -544,12 +544,15 @@ void __init of_irq_init(const struct of_device_id *matches)
>  
>  			list_del(&desc->list);
>  
> +			of_node_set_flag(desc->dev, OF_POPULATED);
> +
>  			pr_debug("of_irq_init: init %s (%p), parent %p\n",
>  				 desc->dev->full_name,
>  				 desc->dev, desc->interrupt_parent);
>  			ret = desc->irq_init_cb(desc->dev,
>  						desc->interrupt_parent);
>  			if (ret) {
> +				of_node_clear_flag(desc->dev, OF_POPULATED);
>  				kfree(desc);
>  				continue;
>  			}
> @@ -559,8 +562,6 @@ void __init of_irq_init(const struct of_device_id *matches)
>  			 * its children can get processed in a subsequent pass.
>  			 */
>  			list_add_tail(&desc->list, &intc_parent_list);
> -
> -			of_node_set_flag(desc->dev, OF_POPULATED);
>  		}
>  
>  		/* Get the next pending parent that might have children */
> 

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

-- 
nvpublic

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ARM: imx6: mark GPC node as not populated after irq init to probe pm domain driver
  2016-08-09 14:18 ` [PATCH 2/2] ARM: imx6: mark GPC node as not populated after irq init to probe pm domain driver Philipp Zabel
@ 2016-08-09 17:35   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2016-08-09 17:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 09, 2016 at 04:18:52PM +0200, Philipp Zabel wrote:
> Since IRQCHIP_DECLARE now flags the GPC node as already populated, the
> GPC power domain driver is never probed unless we clear the flag again.
> 
> Fixes: 15cc2ed6dcf9 ("of/irq: Mark initialised interrupt controllers as populated")
> Suggested-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Jon Hunter <jonathanh@nvidia.com>
> ---
>  arch/arm/mach-imx/gpc.c | 6 ++++++
>  1 file changed, 6 insertions(+)

I've applied both patches.

Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-09 17:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09 14:18 [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation Philipp Zabel
2016-08-09 14:18 ` [PATCH 2/2] ARM: imx6: mark GPC node as not populated after irq init to probe pm domain driver Philipp Zabel
2016-08-09 17:35   ` Rob Herring
2016-08-09 16:30 ` [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation Jon Hunter

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).