From cb667b97c6637d540cc9a87290072681ceeb327f Mon Sep 17 00:00:00 2001 From: Thomas Haemmerle Date: Tue, 12 Mar 2019 11:20:50 +0100 Subject: 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 Signed-off-by: Michael Tretter Signed-off-by: Sascha Hauer --- drivers/of/base.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/of') diff --git a/drivers/of/base.c b/drivers/of/base.c index b082f0c656..85c7953370 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); -- cgit v1.2.3