Skip to content

Commit 3aa0582

Browse files
sudeep-hollaAndy Gross
authored and
Andy Gross
committed
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 <[email protected]> Cc: Rob Herring <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> Signed-off-by: Andy Gross <[email protected]>
1 parent c01fc22 commit 3aa0582

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/of/platform.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,10 @@ static int __init of_platform_default_populate_init(void)
518518
for_each_matching_node(node, reserved_mem_matches)
519519
of_platform_device_create(node, NULL, NULL);
520520

521+
node = of_find_node_by_path("/firmware");
522+
if (node)
523+
of_platform_populate(node, NULL, NULL, NULL);
524+
521525
/* Populate everything else. */
522526
of_platform_default_populate(NULL, NULL, NULL);
523527

0 commit comments

Comments
 (0)