linux: update LTS kernel
[openadk.git] / target / linux / patches / 6.6.22 / armnommu-versatile.patch
blobf8f10f50bf4618b015b4367f993cf865fb88cd0f
1 From 77c038d93769c92ef54cdbb50388564d1b37987b Mon Sep 17 00:00:00 2001
2 From: Greg Ungerer <gerg@kernel.org>
3 Date: Fri, 23 Sep 2016 13:37:34 +1000
4 Subject: [PATCH] ARM: versatile: support configuring versatile machine for no-MMU
6 Allow the arm versatile machine to be configured for no-MMU operation.
8 Older kernels had the ability to build the versatile machine with the MMU
9 disabled (!CONFIG_MMU). Recent changes to convert the versatile machine
10 to device tree lost this ability. (Although older kernels could be built
11 they did not run due to a bug in the IO_ADDRESS() mapping on this machine).
13 The motivation for this is that the versatile machine is well supported
14 in qemu. And this provides an excellent platform for development and
15 testing no-MMU support on ARM in general.
17 This patch adds a versatile platform selection in the upper level arm
18 system type menu - where it appeared in older kernel versions - when
19 configuring for the no-MMU case. There is no visible change to the way
20 versatile is selected for the MMU enabled case.
22 Signed-off-by: Greg Ungerer <gerg@kernel.org>
23 ---
24 arch/arm/Kconfig | 13 ++++++++++++-
25 arch/arm/include/asm/mach/map.h | 1 +
26 arch/arm/mach-versatile/Kconfig | 2 +-
27 arch/arm/mach-versatile/versatile.c | 4 ++++
28 4 files changed, 18 insertions(+), 2 deletions(-)
30 diff --git a/arch/arm/mach-versatile/versatile.c b/arch/arm/mach-versatile/versatile.c
31 index 02ba68abe533..835b51bc597b 100644
32 --- a/arch/arm/mach-versatile/versatile.c
33 +++ b/arch/arm/mach-versatile/versatile.c
34 @@ -22,7 +22,11 @@
35 #include <asm/mach/map.h>
37 /* macro to get at MMIO space when running virtually */
38 +#ifdef CONFIG_MMU
39 #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
40 +#else
41 +#define IO_ADDRESS(x) (x)
42 +#endif
43 #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n))
46 diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
47 index 2b8970d8e5a2..41844ab6aec5 100644
48 --- a/arch/arm/include/asm/mach/map.h
49 +++ b/arch/arm/include/asm/mach/map.h
50 @@ -60,6 +60,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys,
51 #else
52 #define iotable_init(map,num) do { } while (0)
53 #define vm_reserve_area_early(a,s,c) do { } while (0)
54 +#define debug_ll_io_init() do { } while (0)
55 #endif
57 #endif
58 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
59 index e24a9820e12f..342e1efa583a 100644
60 --- a/arch/arm/Kconfig
61 +++ b/arch/arm/Kconfig
62 @@ -307,12 +307,23 @@ config MMU
63 Select if you want MMU-based virtualised addressing space
64 support by paged memory management. If unsure, say 'Y'.
66 +choice
67 + prompt "ARM system type"
68 + depends on !MMU
69 + default ARM_SINGLE_ARMV7M
71 config ARM_SINGLE_ARMV7M
72 - def_bool !MMU
73 + bool "ARMv7-M based platforms (Cortex-M0/M3/M4)"
74 select ARM_NVIC
75 select CPU_V7M
76 select NO_IOPORT_MAP
78 +config ARM_SINGLE_ARM926
79 + bool "ARM926 based platforms"
80 + select CPU_ARM926T
82 +endchoice
84 config ARCH_MMAP_RND_BITS_MIN
85 default 8
87 diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
88 index b1519b4dc03a..2f1bf95daeb0 100644
89 --- a/arch/arm/mach-versatile/Kconfig
90 +++ b/arch/arm/mach-versatile/Kconfig
91 @@ -1,7 +1,7 @@
92 # SPDX-License-Identifier: GPL-2.0
93 config ARCH_VERSATILE
94 bool "ARM Ltd. Versatile family"
95 - depends on ARCH_MULTI_V5
96 + depends on ARCH_MULTI_V5 || ARM_SINGLE_ARM926
97 depends on CPU_LITTLE_ENDIAN
98 select ARM_AMBA
99 select ARM_TIMER_SP804
101 2.25.1