summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-08-19 15:03:04 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-08-19 15:40:45 +0200
commitb9014db5661d5a447f2d2d7717ad9be839d5e741 (patch)
treea8cd9d5bdca4fc62d46c117441cd4017187e6566 /arch
parent66f5e31b788991ac53cafb62a4307da6734db07d (diff)
downloadbarebox-b9014db5661d5a447f2d2d7717ad9be839d5e741.tar.gz
barebox-b9014db5661d5a447f2d2d7717ad9be839d5e741.tar.xz
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/include/mach/generic.h9
1 files changed, 9 insertions, 0 deletions
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)