ARM: versatile: support configuring versatile machine for no-MMU
Allow the arm versatile machine to be configured for no-MMU operation.
Older kernels had the ability to build the versatile machine with the MMU
disabled (!CONFIG_MMU). Recent changes to convert the versatile machine
to device tree lost this ability. (Although older kernels could be built
they did not run due to a bug in the IO_ADDRESS() mapping on this machine).
The motivation for this is that the versatile machine is well supported
in qemu. And this provides an excellent platform for development and
testing no-MMU support on ARM in general.
Currently the non-MMU support is only for ARM V7 CPU machines, so this
change extends support only to the ARM 926T based Versatile machines.
There is no visible change to the way Versatile is selected for the
MMU enabled case.
Signed-off-by: Greg Ungerer <gerg@kernel.org>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b1f3df3..8af414a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -321,12 +321,23 @@
Select if you want MMU-based virtualised addressing space
support by paged memory management. If unsure, say 'Y'.
+choice
+ prompt "ARM system type"
+ depends on !MMU
+ default ARM_SINGLE_ARMV7M
+
config ARM_SINGLE_ARMV7M
- def_bool !MMU
+ bool "ARMv7-M based platforms (Cortex-M0/M3/M4)"
select ARM_NVIC
select CPU_V7M
select NO_IOPORT_MAP
+config ARM_SINGLE_VERSATILE
+ bool "Versatile based platform"
+ select CPU_ARM926T
+
+endchoice
+
config ARCH_MMAP_RND_BITS_MIN
default 8
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index 5136180..bf1040b 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
config ARCH_VERSATILE
bool "ARM Ltd. Versatile family"
- depends on ARCH_MULTI_V5
+ depends on ARCH_MULTI_V5 || ARM_SINGLE_VERSATILE
depends on CPU_LITTLE_ENDIAN
select ARM_AMBA
select ARM_TIMER_SP804