summaryrefslogtreecommitdiff
path: root/drivers/of/platform.c
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2020-05-14 22:35:00 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-15 16:34:52 +0200
commit93d2e4322aa74c1ad1e8c2160608eb9a960d69ff (patch)
tree7c0fb7eccc005e97667b2fe7d6f42e688523e8ad /drivers/of/platform.c
parent716a7a25969003d82ab738179c3f1068a120ed11 (diff)
of: platform: Batch fwnode parsing when adding all top level devices
The fw_devlink_pause() and fw_devlink_resume() APIs allow batching the parsing of the device tree nodes when a lot of devices are added. This will significantly cut down parsing time (as much a 1 second on some systems). So, use them when adding devices for all the top level device tree nodes in a system. Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20200515053500.215929-5-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r--drivers/of/platform.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 3371e4a06248..55d719347810 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -538,7 +538,9 @@ static int __init of_platform_default_populate_init(void)
}
/* Populate everything else. */
+ fw_devlink_pause();
of_platform_default_populate(NULL, NULL, NULL);
+ fw_devlink_resume();
return 0;
}