[PATCH V7 3/3] firmware: imx: imx-scu: register build-in child devices

Aisheng Dong aisheng.dong at nxp.com
Thu Mar 7 04:26:47 PST 2019


[...]

> > diff --git a/drivers/firmware/imx/imx-scu.c
> > b/drivers/firmware/imx/imx-scu.c index 2bb1a19..df75ead 100644
> > --- a/drivers/firmware/imx/imx-scu.c
> > +++ b/drivers/firmware/imx/imx-scu.c
...
> > +	/* register SCU child devices which are NOT in device tree */
> > +	child_pdev = platform_device_register_data(dev, "imx-sc-wdt",
> > +				PLATFORM_DEVID_NONE, NULL, 0);
> > +	if (IS_ERR(child_pdev))
> > +		dev_warn(dev, "failed to register scu watchdog device %ld!\n",
> > +			 PTR_ERR(child_pdev));
> > +
> 
> I just realized ... since this is not a devm_ function, we now also need error
> handling (if devm_of_platform_populate() fails) and a remove function.
> Sorry for that - I should have noticed earlier.
> 

It looks strange to me that instantiate the watchdog device in SCU driver which
actually does not use SCU.

For me, it's actually a watchdog provided by ATF firmware, not SCU.
I explained this to Rob in another mail.
Let's see Rob's comments on it.

If Rob agrees, we can move watchdog node out of SCU and also do not
need instantiate it in SCU driver.

Regards
Dong Aisheng

> Guenter
> 
> >   	return devm_of_platform_populate(dev);
> >   }
> >
> >



More information about the linux-arm-kernel mailing list