Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64

From: Uwe Kleine-König
Date: Tue Jan 14 2020 - 03:17:55 EST


On Tue, Jan 14, 2020 at 08:08:45AM +0000, Peng Fan wrote:
> From: Peng Fan <peng.fan@xxxxxxx>
>
> Only need to build soc-imx8.c when CONFIG_ARM64 defined,
> no need to build it for CONFIG_ARM32 currently.
>
> Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
> ---
> drivers/soc/imx/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile
> index cf9ca42ff739..cfcbc62b11d7 100644
> --- a/drivers/soc/imx/Makefile
> +++ b/drivers/soc/imx/Makefile
> @@ -1,5 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0-only
> obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
> obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
> +ifdef CONFIG_ARM64
> obj-$(CONFIG_ARCH_MXC) += soc-imx8.o
> +endif

For earlier SoCs we had kconfig symbols like SOC_IMX25. Actually
SOC_IMX8 would be the right one to decide about soc-imx8.c to be
compiled, it would be easier to read and verify than the suggested
"ARM64 && ARCH_MXC" and it would stay right once NXP presents it's next
64-bit SoC i.MX9.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |