[U-Boot] [PATCH v2 5/7] arm: v7R: Add initial support

Lokesh Vutla lokeshvutla at ti.com
Thu Apr 26 12:51:29 UTC 2018


From: Michal Simek <michal.simek at xilinx.com>

The Cortex-R* processors are a mid-range CPUs for use in deeply-embedded,
real-time systems. It implements the ARMv7-R architecture, and includes
Thumb-2 technology for optimum code density and processing throughput.

Except for MPU(Memory Protection Unit) and few CP15 registers, most of the
features are compatible with v7 architecture. So,reuse the same armv7
folder and introduce a new config CPU_V7R in order to differentiate
from v7 based platforms.

Tested-by: Michal Simek <michal.simek at xilinx.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
---
 arch/arm/Kconfig           | 7 +++++++
 arch/arm/Makefile          | 2 ++
 arch/arm/cpu/armv7/start.S | 2 ++
 cmd/Kconfig                | 2 +-
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8efaccbcb8..fcdbded22a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -212,6 +212,11 @@ config CPU_V7M
 	select THUMB2_KERNEL
 	select SYS_CACHE_SHIFT_5
 
+config CPU_V7R
+	bool
+	select HAS_THUMB2
+	select SYS_CACHE_SHIFT_6
+
 config CPU_PXA
 	bool
 	select SYS_CACHE_SHIFT_5
@@ -230,6 +235,7 @@ config SYS_CPU
 	default "arm1136" if CPU_ARM1136
 	default "arm1176" if CPU_ARM1176
 	default "armv7" if CPU_V7A
+	default "armv7" if CPU_V7R
 	default "armv7m" if CPU_V7M
 	default "pxa" if CPU_PXA
 	default "sa1100" if CPU_SA1100
@@ -245,6 +251,7 @@ config SYS_ARM_ARCH
 	default 6 if CPU_ARM1176
 	default 7 if CPU_V7A
 	default 7 if CPU_V7M
+	default 7 if CPU_V7R
 	default 5 if CPU_PXA
 	default 4 if CPU_SA1100
 	default 8 if ARM64
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 2979ad86fd..3f5343bc01 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -18,6 +18,7 @@ arch-$(CONFIG_CPU_ARM1136)	=-march=armv5
 arch-$(CONFIG_CPU_ARM1176)	=-march=armv5t
 arch-$(CONFIG_CPU_V7A)		=$(call cc-option, -march=armv7-a, \
 				 $(call cc-option, -march=armv7, -march=armv5))
+arch-$(CONFIG_CPU_V7R)		=-march=armv7-r
 arch-$(CONFIG_ARM64)		=-march=armv8-a
 
 # On Tegra systems we must build SPL for the armv4 core on the device
@@ -41,6 +42,7 @@ tune-$(CONFIG_CPU_PXA)		=-mcpu=xscale
 tune-$(CONFIG_CPU_ARM1136)	=
 tune-$(CONFIG_CPU_ARM1176)	=
 tune-$(CONFIG_CPU_V7A)		=
+tune-$(CONFIG_CPU_V7R)		=
 tune-$(CONFIG_ARM64)		=
 
 # Evaluate tune cc-option calls now
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 937f7051fe..29b51f2a0f 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -82,7 +82,9 @@ switch_to_hypervisor_ret:
 
 	/* the mask ROM code should have PLL and others stable */
 #ifndef CONFIG_SKIP_LOWLEVEL_INIT
+#ifdef CONFIG_CPU_V7A
 	bl	cpu_init_cp15
+#endif
 #ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
 	bl	cpu_init_crit
 #endif
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 511d9117a0..9c1115db59 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1103,7 +1103,7 @@ config BOOTP_PXE_CLIENTARCH
 config BOOTP_VCI_STRING
 	string
 	depends on CMD_BOOTP
-	default "U-Boot.armv7" if CPU_V7A || CPU_V7M
+	default "U-Boot.armv7" if CPU_V7A || CPU_V7M || CPU_V7R
 	default "U-Boot.armv8" if ARM64
 	default "U-Boot.arm" if ARM
 	default "U-Boot"
-- 
2.17.0



More information about the U-Boot mailing list