diff options
author | Dmitry Rokosov <ddrokosov@sberdevices.ru> | 2023-03-24 17:55:57 +0300 |
---|---|---|
committer | Neil Armstrong <neil.armstrong@linaro.org> | 2023-03-27 12:07:17 +0200 |
commit | e45f243409db98d610248c843b25435e7fb0baf3 (patch) | |
tree | e8d25ccfe46fe204ab6129105bba4709a1804ddd /drivers/firmware | |
parent | 78e812f0406c765fc5623b1d68e3c6e86cb32e5a (diff) | |
download | linux-e45f243409db98d610248c843b25435e7fb0baf3.tar.gz |
firmware: meson_sm: populate platform devices from sm device tree data
In some meson boards, secure monitor device has children, for example,
power secure controller. By default, secure monitor isn't the bus in terms
of device tree subsystem, so the of_platform initialization code doesn't
populate its device tree data. As a result, secure monitor's children
aren't probed at all.
Run the 'of_platform_populate()' routine manually to resolve such issues.
Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230324145557.27797-1-ddrokosov@sberdevices.ru
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/meson/meson_sm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c index 3f5ff9ed668e..798bcdb05d84 100644 --- a/drivers/firmware/meson/meson_sm.c +++ b/drivers/firmware/meson/meson_sm.c @@ -311,11 +311,14 @@ static int __init meson_sm_probe(struct platform_device *pdev) platform_set_drvdata(pdev, fw); - pr_info("secure-monitor enabled\n"); + if (devm_of_platform_populate(dev)) + goto out_in_base; if (sysfs_create_group(&pdev->dev.kobj, &meson_sm_sysfs_attr_group)) goto out_in_base; + pr_info("secure-monitor enabled\n"); + return 0; out_in_base: |