Commit e55aeb6b authored by Philipp Zabel's avatar Philipp Zabel Committed by Rob Herring

of/irq: Mark interrupt controllers as populated before initialisation

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: 15cc2ed6 ("of/irq: Mark initialised interrupt controllers as populated")
Suggested-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Acked-by: default avatarJon Hunter <jonathanh@nvidia.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 89c67752
...@@ -544,12 +544,15 @@ void __init of_irq_init(const struct of_device_id *matches) ...@@ -544,12 +544,15 @@ void __init of_irq_init(const struct of_device_id *matches)
list_del(&desc->list); list_del(&desc->list);
of_node_set_flag(desc->dev, OF_POPULATED);
pr_debug("of_irq_init: init %s (%p), parent %p\n", pr_debug("of_irq_init: init %s (%p), parent %p\n",
desc->dev->full_name, desc->dev->full_name,
desc->dev, desc->interrupt_parent); desc->dev, desc->interrupt_parent);
ret = desc->irq_init_cb(desc->dev, ret = desc->irq_init_cb(desc->dev,
desc->interrupt_parent); desc->interrupt_parent);
if (ret) { if (ret) {
of_node_clear_flag(desc->dev, OF_POPULATED);
kfree(desc); kfree(desc);
continue; continue;
} }
...@@ -559,8 +562,6 @@ void __init of_irq_init(const struct of_device_id *matches) ...@@ -559,8 +562,6 @@ void __init of_irq_init(const struct of_device_id *matches)
* its children can get processed in a subsequent pass. * its children can get processed in a subsequent pass.
*/ */
list_add_tail(&desc->list, &intc_parent_list); 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 */ /* Get the next pending parent that might have children */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment