aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/imxrt/soc.c
diff options
context:
space:
mode:
authorGiulio Benetti <giulio.benetti@benettiengineering.com>2021-05-20 16:10:13 +0200
committerStefano Babic <sbabic@denx.de>2021-06-09 13:03:33 +0200
commit0d90dec18222871d6884aa7ed483169cd016e399 (patch)
treeadb3511d0be803ca2d831a3ec8455caacd14f463 /arch/arm/mach-imx/imxrt/soc.c
parentd7308dbd864c1d0447bfe62cc42a6ff470369d66 (diff)
downloadu-boot-0d90dec18222871d6884aa7ed483169cd016e399.zip
u-boot-0d90dec18222871d6884aa7ed483169cd016e399.tar.gz
u-boot-0d90dec18222871d6884aa7ed483169cd016e399.tar.bz2
ARM: IMXRT: introduce is_imxrt*() macros and get_cpu_rev()
We need those macros to instruct drivers on how to behave for SoC specific quirks, so let's add it as done for other i.MX SoCs. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Diffstat (limited to 'arch/arm/mach-imx/imxrt/soc.c')
-rw-r--r--arch/arm/mach-imx/imxrt/soc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imxrt/soc.c b/arch/arm/mach-imx/imxrt/soc.c
index c533f35..ba01599 100644
--- a/arch/arm/mach-imx/imxrt/soc.c
+++ b/arch/arm/mach-imx/imxrt/soc.c
@@ -8,6 +8,7 @@
#include <init.h>
#include <asm/io.h>
#include <asm/armv7_mpu.h>
+#include <asm/mach-imx/sys_proto.h>
#include <linux/bitops.h>
int arch_cpu_init(void)
@@ -35,3 +36,14 @@ int arch_cpu_init(void)
return 0;
}
+
+u32 get_cpu_rev(void)
+{
+#if defined(CONFIG_IMXRT1020)
+ return MXC_CPU_IMXRT1020 << 12;
+#elif defined(CONFIG_IMXRT1050)
+ return MXC_CPU_IMXRT1050 << 12;
+#else
+#error This IMXRT SoC is not supported
+#endif
+}