[PATCH] soc: imx: check ls1021a

Arnd Bergmann arnd at arndb.de
Fri Jul 17 12:19:22 EDT 2020


On Thu, Jul 9, 2020 at 10:31 AM <peng.fan at nxp.com> wrote:
>
> From: Peng Fan <peng.fan at nxp.com>
>
> fsl,ls1021a is a mach under arch/arm/mach-imx/, however it could
> not use the soc driver which will break caam on ls1021a platform.
>
> So directly return if it is compatible with fsl,ls1021a.
>
> Fixes: 52102a3ba6a61 ("soc: imx: move cpu code to drivers/soc/imx")
> Signed-off-by: Peng Fan <peng.fan at nxp.com>

I just forwarded this patch to Linus as part of the v5.8 fixes.
The patch goes in the right direction, but as far as I can tell,
the code is still wrong and needs to be fixed. Can you create
another patch on top?

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.

      Arnd



More information about the linux-arm-kernel mailing list