Support for the ARM Cortex-R7 Processor
Subsystems (2)
cover Support for the ARM Cortex-R7 Processor
This series adds initial support for the ARM Cortex-R7 Processor. The R7 is an SMP-capable R-class device. Among other things, R-Class cores differ from the A-class in using a Memory Protection Unity (MPU) instead of an MMU.
Support for the MPU is required in order to use the R7 in an SMP configuration. There are patches for MPU support that will be posted to this list shortly.
This series depends on:
- The nommu fixes series I posted to this list earlier
- http://lists.infradead.org/pipermail/linux-arm-kernel/2013-May/168114.html
- The ARCH_MULTIPLATFORM restructuring that I posted earlier in order to be able to use ARCH_VEXPRESS with NOMMU.
- http://lists.infradead.org/pipermail/linux-arm-kernel/2013-May/168106.html
This code is available in my r7 branch:
http://www.linux-arm.org/git?p=linux-ja.git;a=log;h=refs/heads/r7
Jonathan Austin (3):
ARM: select CPU_CPU15_MMU/MPU appropriately
ARM: add Cortex-R7 Processor Info
ARM: vexpress: Add Cortex-R Series UART, selectable via DEBUG_LL
arch/arm/Kconfig.debug | 10 +++++++++- arch/arm/include/debug/vexpress.S | 10 ++++++++++ arch/arm/mm/Kconfig | 3 ++- arch/arm/mm/proc-v7.S | 13 ++++++++++++- 4 files changed, 33 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/3 ARM: select CPU_CPU15_MMU/MPU appropriately
Currently CPU_V7 selects CPU_CP15_MMU, however in the case of a V7 CPU implementing the PMSA, such as the Cortex-R7, the CP15_MMU operations are not available. Selecting CPU_CP15_MPU is appropriate in this case.
This patch makes CPU_CP15_MMU dependent on the use of the MMU, selecting CPU_CP15_MPU for v7 processors when !MMU is chosen.
--- arch/arm/mm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mm/Kconfig +2 -1
@@ -392,7 +392,8 @@ config CPU_V7 select CPU_CACHE_V7 select CPU_CACHE_VIPT select CPU_COPY_V6 if MMU - select CPU_CP15_MMU + select CPU_CP15_MMU if MMU + select CPU_CP15_MPU if !MMU select CPU_HAS_ASID if MMU select CPU_PABRT_V7 select CPU_TLB_V7 if MMU
Signature · 1 line
1.7.9.5
PATCH 2/3 ARM: add Cortex-R7 Processor Info
In reply to Jonathan AustinThis patch adds processor info for ARM Ltd. Cortex-R7.
The R7 has many similarities to the A9 and though the ACTLR layout is not identical, the bits associated with cache operations broadcasting and SMP modes are the same for A9, A5 and R7 (Though in the A-class processors the same bits toggle TLB-ops broadcasting as well as cache-ops)
HWCAP_IDIV need not be specified as this is now auto-detected
--- arch/arm/mm/proc-v7.S | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
arch/arm/mm/proc-v7.S +12 -1
@@ -159,7 +159,8 @@ ENDPROC(cpu_v7_do_resume) */ __v7_ca5mp_setup: __v7_ca9mp_setup: - mov r10, #(1 << 0) @ TLB ops broadcasting +__v7_cr7mp_setup: + mov r10, #(1 << 0) @ Cache/TLB ops broadcasting b 1f __v7_ca7mp_setup: __v7_ca15mp_setup:
@@ -419,6 +420,16 @@ __v7_pj4b_proc_info: .size __v7_pj4b_proc_info, . - __v7_pj4b_proc_info /* + * ARM Ltd. Cortex R7 processor. + */ + .type __v7_cr7mp_proc_info, #object +__v7_cr7mp_proc_info: + .long 0x410fc170 + .long 0xff0ffff0 + __v7_proc __v7_cr7mp_setup + .size __v7_cr7mp_proc_info, . - __v7_cr7mp_proc_info + + /* * ARM Ltd. Cortex A7 processor. */ .type __v7_ca7mp_proc_info, #object
Signature · 1 line
1.7.9.5
PATCH 3/3 ARM: vexpress: Add Cortex-R Series UART, selectable via DEBUG_LL
In reply to Jonathan AustinThe Cortex-R series processors on Versatile Express have a different memory map to the RS1 and CA9X4 tiles. Most of the platform difference can be expressed in device-trees, but the UART definitions for LL_DEBUG cannot.
This patch defines the UART location for R-Series processors on versatile-express, allowing low-level debug and output from the decompressor. These definitions are selectable via Kconfig
--- arch/arm/Kconfig.debug | 10 +++++++++- arch/arm/include/debug/vexpress.S | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-)
arch/arm/Kconfig.debug +9 -1
@@ -476,6 +476,13 @@ choice of the tiles using the RS1 memory map, including all new A-class core tiles, FPGA-based SMMs and software models. + config DEBUG_VEXPRESS_UART0_CRX + bool "Use PL011 UART0 at 0xb0090000 (Cortex-R compliant tiles)" + depends on ARCH_VEXPRESS_NOMMU + help + This option selects UART0 at 0xb0090000. This is appropriate for + Cortex-R series tiles and SMMs, such as Cortex-R5 and Cortex-R7 + config DEBUG_VT8500_UART0 bool "Use UART0 on VIA/Wondermedia SoCs" depends on ARCH_VT8500
@@ -645,7 +652,8 @@ config DEBUG_LL_INCLUDE default "debug/tegra.S" if DEBUG_TEGRA_UART default "debug/ux500.S" if DEBUG_UX500_UART default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ - DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 + DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 || \ + DEBUG_VEXPRESS_UART0_CRX default "debug/vt8500.S" if DEBUG_VT8500_UART0 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 default "mach/debug-macro.S"
arch/arm/include/debug/vexpress.S +10 -0
@@ -16,6 +16,8 @@ #define DEBUG_LL_PHYS_BASE_RS1 0x1c000000 #define DEBUG_LL_UART_OFFSET_RS1 0x00090000 +#define DEBUG_LL_UART_PHYS_CRX 0xb0090000 + #define DEBUG_LL_VIRT_BASE 0xf8000000 #if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT)
@@ -67,6 +69,14 @@ #include <asm/hardware/debug-pl01x.S> +#elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CRX) + + .macro addruart,rp,tmp,tmp2 + ldr \rp, =DEBUG_LL_UART_PHYS_CRX + .endm + +#include <asm/hardware/debug-pl01x.S> + #else /* CONFIG_DEBUG_LL_UART_NONE */ .macro addruart, rp, rv, tmp
Signature · 1 line
1.7.9.5