From b9014db5661d5a447f2d2d7717ad9be839d5e741 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 19 Aug 2019 15:03:04 +0200 Subject: ARM: i.MX: When generic DT image is enabled do not hardcode SoC When only a single i.MX SoC is selected the cpu_is_mx?() macros expand to static 0 or 1. With the generic DT image enabled it could be though that the SoC is not a i.MX at all, so make sure that with the generic DT image enabled the cpu_is_mx?() macros always compare against __imx_cpu_type Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/include/mach/generic.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/mach-imx') diff --git a/arch/arm/mach-imx/include/mach/generic.h b/arch/arm/mach-imx/include/mach/generic.h index ac066e3f17..5102c34e4c 100644 --- a/arch/arm/mach-imx/include/mach/generic.h +++ b/arch/arm/mach-imx/include/mach/generic.h @@ -223,6 +223,15 @@ extern unsigned int __imx_cpu_type; # define cpu_is_vf610() (0) #endif +#ifdef CONFIG_BOARD_ARM_GENERIC_DT +# ifdef imx_cpu_type +# undef imx_cpu_type +# define imx_cpu_type __imx_cpu_type +# else +# define imx_cpu_type 0 +# endif +#endif + #define cpu_is_mx23() (0) #define cpu_is_mx28() (0) -- cgit v1.2.3