[PATCH v2] firmware: meson_sm: populate platform devices from sm device tree data

Dmitry Rokosov ddrokosov at sberdevices.ru
Fri Mar 24 07:08:25 PDT 2023


Sorry, I've missed the changelog. Please find it below if any.

On Fri, Mar 24, 2023 at 05:01:41PM +0300, Dmitry Rokosov wrote:
> 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 at sberdevices.ru>
---

Changes v2 since v1 at [1]:
    - decline the device tree /firmware based solution
    - introduce devm_of_platform_populate() solution in the meson sm driver

Links:
    [1] https://lore.kernel.org/all/20230323185548.13731-1-ddrokosov@sberdevices.ru/

> ---
>  drivers/firmware/meson/meson_sm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
> index 77aa5c6398aa..b79d0e316cb1 100644
> --- a/drivers/firmware/meson/meson_sm.c
> +++ b/drivers/firmware/meson/meson_sm.c
> @@ -316,7 +316,7 @@ static int __init meson_sm_probe(struct platform_device *pdev)
>  	if (sysfs_create_group(&pdev->dev.kobj, &meson_sm_sysfs_attr_group))
>  		goto out_in_base;
>  
> -	return 0;
> +	return devm_of_platform_populate(dev);
>  
>  out_in_base:
>  	iounmap(fw->sm_shmem_in_base);
> -- 
> 2.36.0
> 

-- 
Thank you,
Dmitry



More information about the linux-arm-kernel mailing list