1From 7c245ffc17a9ab6215830d4ecd8b2f9beddb487c Mon Sep 17 00:00:00 2001 2From: Waldemar Brodkorb <wbx@openadk.org> 3Date: Fri, 1 Feb 2019 11:36:20 +0100 4Subject: [PATCH] arm-versatile-nommu: Linux patch 5 6Originally made by Waldemar Brodkorb <wbx@openadk.org> from LKML. 7 8Rename CLKSRC_OF to TIMER_OF (kernel >= 4.13) 9https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bb0eb050a577a866cb47c2dc37596f1207f4c2d9 10 11Remove GENERIC_CLOCKEVENTS since its enabled by default (kernel >= 5.11) 12https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0774a6ed294b963dc76df2d8342ab86d030759ec 13 14Select CONFIG_GENERIC_IRQ_MULTI_HANDLER since irqchip doesn't select it anymore (kernel >= 5.12) 15https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a79f7051cccb6f3bcd3d2a0a058c7d5c79bb0371 16 17Signed-Off-by: Waldemar Brodkorb <wbx@openadk.org> 18[Gerome: reformated as a Git patch] 19Signed-off-by: Gerome Burlats <gerome.burlats@smile.fr> 20[Romain: fix Waldemar's authorship in Git patch] 21Signed-off-by: Romain Naour <romain.naour@smile.fr> 22--- 23 arch/arm/Kconfig | 11 +++++++++++ 24 arch/arm/Kconfig.debug | 3 ++- 25 arch/arm/include/asm/mach/map.h | 1 + 26 arch/arm/mach-versatile/Kconfig | 5 +++-- 27 arch/arm/mach-versatile/Makefile.boot | 3 +++ 28 arch/arm/mach-versatile/versatile_dt.c | 4 ++++ 29 6 files changed, 24 insertions(+), 3 deletions(-) 30 create mode 100644 arch/arm/mach-versatile/Makefile.boot 31 32diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig 33index dcf2df6da98f..c2155c1a2eba 100644 34--- a/arch/arm/Kconfig 35+++ b/arch/arm/Kconfig 36@@ -337,6 +337,17 @@ config ARM_SINGLE_ARMV7M 37 select SPARSE_IRQ 38 select USE_OF 39 40+config ARM_SINGLE_ARCH_VERSATILE 41+ bool "ARM Ltd. Versatile family" 42+ depends on !MMU 43+ select AUTO_ZRELADDR 44+ select TIMER_OF 45+ select COMMON_CLK 46+ select GENERIC_IRQ_MULTI_HANDLER 47+ select GPIOLIB 48+ select SPARSE_IRQ 49+ select USE_OF 50+ 51 config ARCH_EP93XX 52 bool "EP93xx-based" 53 select ARCH_SPARSEMEM_ENABLE 54diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug 55index 98436702e0c7..7e63299ceb40 100644 56--- a/arch/arm/Kconfig.debug 57+++ b/arch/arm/Kconfig.debug 58@@ -1891,7 +1891,8 @@ config DEBUG_UNCOMPRESS 59 config UNCOMPRESS_INCLUDE 60 string 61 default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \ 62- PLAT_SAMSUNG || ARM_SINGLE_ARMV7M 63+ PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \ 64+ ARM_SINGLE_ARCH_VERSATILE 65 default "mach/uncompress.h" 66 67 config EARLY_PRINTK 68diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h 69index 92282558caf7..90bd9c069ffc 100644 70--- a/arch/arm/include/asm/mach/map.h 71+++ b/arch/arm/include/asm/mach/map.h 72@@ -59,6 +59,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys, 73 #else 74 #define iotable_init(map,num) do { } while (0) 75 #define vm_reserve_area_early(a,s,c) do { } while (0) 76+#define debug_ll_io_init() do { } while (0) 77 #endif 78 79 #endif 80diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig 81index d88e7725bf99..d38b90157f13 100644 82--- a/arch/arm/mach-versatile/Kconfig 83+++ b/arch/arm/mach-versatile/Kconfig 84@@ -1,7 +1,8 @@ 85 # SPDX-License-Identifier: GPL-2.0 86 config ARCH_VERSATILE 87- bool "ARM Ltd. Versatile family" 88- depends on ARCH_MULTI_V5 89+ bool "ARM Ltd. Versatile family" if ARCH_MULTI_V5 90+ depends on ARCH_MULTI_V5 || ARM_SINGLE_ARCH_VERSATILE 91+ default y if ARM_SINGLE_ARCH_VERSATILE 92 select ARM_AMBA 93 select ARM_TIMER_SP804 94 select ARM_VIC 95diff --git a/arch/arm/mach-versatile/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot 96new file mode 100644 97index 000000000000..eacfc3f5c33e 98--- /dev/null 99+++ b/arch/arm/mach-versatile/Makefile.boot 100@@ -0,0 +1,3 @@ 101+# Empty file waiting for deletion once Makefile.boot isn't needed any more. 102+# Patch waits for application at 103+# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 . 104diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c 105index 02ba68abe533..835b51bc597b 100644 106--- a/arch/arm/mach-versatile/versatile_dt.c 107+++ b/arch/arm/mach-versatile/versatile_dt.c 108@@ -22,7 +22,11 @@ 109 #include <asm/mach/map.h> 110 111 /* macro to get at MMIO space when running virtually */ 112+#ifdef CONFIG_MMU 113 #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) 114+#else 115+#define IO_ADDRESS(x) (x) 116+#endif 117 #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n)) 118 119 /* 120-- 1212.31.1 122 123