[U-Boot] [PATCH] imx: require CCM driver only on i.MX8MM
Patrick Wildt
patrick at blueri.se
Tue Oct 15 13:17:51 UTC 2019
On Tue, Oct 15, 2019 at 06:16:15AM +0000, Peng Fan wrote:
> > Subject: [PATCH] imx: require CCM driver only on i.MX8MM
> >
> > Since there is no clock driver like that for i.MX8MQ, we cannot require it on
> > that platform, so make sure it is only built for i.MX8MM. This makes
> > i.MX8MQ platforms work again.
>
>
> I would add this:
> diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
> index c46031dd12..3e73ca3cca 100644
> --- a/arch/arm/mach-imx/imx8m/soc.c
> +++ b/arch/arm/mach-imx/imx8m/soc.c
> @@ -236,12 +236,14 @@ int arch_cpu_init_dm(void)
> struct udevice *dev;
> int ret;
>
> - ret = uclass_get_device_by_name(UCLASS_CLK,
> - "clock-controller at 30380000",
> - &dev);
> - if (ret < 0) {
> - printf("Failed to find clock node. Check device tree\n");
> - return ret;
> + if (CONFIG_IS_ENABLED(CLK)) {
> + ret = uclass_get_device_by_name(UCLASS_CLK,
> + "clock-controller at 30380000",
> + &dev);
> + if (ret < 0) {
> + printf("Failed to find clock node. Check device tree\n");
> + return ret;
> + }
> }
>
> return 0;
>
> Thanks,
> Peng.
That looks good to me and does indeed work.
Reviewed-by: Patrick Wildt <patrick at blueri.se>
Tested-by: Patrick Wildt <patrick at blueri.se>
> >
> > Signed-off-by: Patrick Wildt <patrick at blueri.se>
> > ---
> > arch/arm/mach-imx/imx8m/soc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/arm/mach-imx/imx8m/soc.c
> > b/arch/arm/mach-imx/imx8m/soc.c index aeca82cdbf..11ca8c86b3 100644
> > --- a/arch/arm/mach-imx/imx8m/soc.c
> > +++ b/arch/arm/mach-imx/imx8m/soc.c
> > @@ -229,6 +229,7 @@ static void imx_set_wdog_powerdown(bool enable)
> > writew(enable, &wdog3->wmcr);
> > }
> >
> > +#ifdef CONFIG_ARCH_IMX8MM
> > int arch_cpu_init_dm(void)
> > {
> > struct udevice *dev;
> > @@ -244,6 +245,7 @@ int arch_cpu_init_dm(void)
> >
> > return 0;
> > }
> > +#endif
> >
> > int arch_cpu_init(void)
> > {
> > --
> > 2.23.0
>
More information about the U-Boot
mailing list