[PATCH] soc: imx: check ls1021a

Arnd Bergmann arnd at arndb.de
Mon Jul 20 03:19:17 EDT 2020


On Mon, Jul 20, 2020 at 9:05 AM Peng Fan <peng.fan at nxp.com> wrote:

> > > > The problem is that loading this driver on *anything* other than an
> > > > i.MX machine will cause unexpected results, and it first has to
> > > > check that it is running on a compatible machine to start with!
> > > >
> > > > In a distro kernel, this driver is always built-in at the moment if
> > > > CONFIG_ARCH_MXC is enabled, regardless of what other platforms are
> > > > enabled in addition, and what machine we end up running on.
> > >
> > > So I could use CONFIG_SOC_IMX[x] to build the file? Is this ok for you?
> >
> > Certainly not, that would not address the problem at all.
>
> Ok, then we have same issue in soc-imx8m.c soc-imx-scu.c I think.
> soc-imx-scu.c use platform driver, but it not use DT.

That driver checks for the presence of the "fsl,imx-scu" device node first:

        np = of_find_compatible_node(NULL, NULL, "fsl,imx-scu");
        if (!np)
                return -ENODEV;

It might be better to return '0' here, but I think it is otherwise correct.

       Arnd



More information about the linux-arm-kernel mailing list