Re: [PATCH] soc: imx: check ls1021a
From: Arnd Bergmann <arnd@arndb.de>
Date: 2020-07-20 07:21:21
On Mon, Jul 20, 2020 at 9:05 AM Peng Fan [off-list ref] wrote:
quoted
quoted
quoted
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel