Skip to content

Commit e45f243

Browse files
rockosovsuperna9999
authored andcommitted
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>
1 parent 78e812f commit e45f243

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/firmware/meson/meson_sm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,14 @@ static int __init meson_sm_probe(struct platform_device *pdev)
311311

312312
platform_set_drvdata(pdev, fw);
313313

314-
pr_info("secure-monitor enabled\n");
314+
if (devm_of_platform_populate(dev))
315+
goto out_in_base;
315316

316317
if (sysfs_create_group(&pdev->dev.kobj, &meson_sm_sysfs_attr_group))
317318
goto out_in_base;
318319

320+
pr_info("secure-monitor enabled\n");
321+
319322
return 0;
320323

321324
out_in_base:

0 commit comments

Comments
 (0)