summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Haemmerle <thomas.haemmerle@wolfvision.net>2019-03-12 11:20:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-18 08:50:38 +0100
commitcb667b97c6637d540cc9a87290072681ceeb327f (patch)
treee5ff91f3dd3563bd437de055693660a9fb150e00 /drivers
parent60fd7d3c2bb90e6980a3889903963b09a1ab98cc (diff)
downloadbarebox-cb667b97c6637d540cc9a87290072681ceeb327f.tar.gz
of: populate "/firmware" while populating device tree
The sub-nodes of "/firmware" are not populated, since it has no "compatible" property. Copy the behavior of Linux and call of_platform_populate() on the "/firmware" node to probe firmware drivers. Signed-off-by: Thomas Haemmerle <thomas.haemmerle@wolfvision.net> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/base.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index b082f0c..85c7953 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1979,7 +1979,7 @@ const struct of_device_id of_default_bus_match_table[] = {
int of_probe(void)
{
- struct device_node *memory;
+ struct device_node *memory, *firmware;
if(!root_node)
return -ENODEV;
@@ -1996,6 +1996,10 @@ int of_probe(void)
if (memory)
of_add_memory(memory, false);
+ firmware = of_find_node_by_path("/firmware");
+ if (firmware)
+ of_platform_populate(firmware, NULL, NULL);
+
of_clk_init(root_node, NULL);
of_platform_populate(root_node, of_default_bus_match_table, NULL);