diff options
author | Sudeep Holla <Sudeep.Holla@arm.com> | 2017-09-28 12:45:59 +0200 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2018-01-04 21:00:20 +0100 |
commit | 3aa0582fdb824139630298880fbf78d4ac774d3c (patch) | |
tree | 1c79dddf40aa60313bb687e97449949c0f017c11 /drivers/of/platform.c | |
parent | soc: qcom: smp2p: Use common error handling code in qcom_smp2p_probe() (diff) | |
download | linux-3aa0582fdb824139630298880fbf78d4ac774d3c.tar.xz linux-3aa0582fdb824139630298880fbf78d4ac774d3c.zip |
of: platform: populate /firmware/ node from of_platform_default_populate_init()
Since "/firmware" does not have its own "compatible" property as it's
just collection of nodes representing firmware interface, it's sub-nodes
are not populated during system initialization.
Currently different firmware drivers search the /firmware/ node and
populate the sub-node devices selectively. Instead we can populate
the /firmware/ node during init to avoid more drivers continuing to
populate the devices selectively.
To generalize the solution this patch populates the /firmware/ node
explicitly from of_platform_default_populate_init().
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r-- | drivers/of/platform.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index b7cf84b29737..78cfb15c7890 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -518,6 +518,10 @@ static int __init of_platform_default_populate_init(void) for_each_matching_node(node, reserved_mem_matches) of_platform_device_create(node, NULL, NULL); + node = of_find_node_by_path("/firmware"); + if (node) + of_platform_populate(node, NULL, NULL, NULL); + /* Populate everything else. */ of_platform_default_populate(NULL, NULL, NULL); |