2
1

versatile-nommu.patch 4.4 KB

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