versatile-nommu.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. From 4ac4324dcdaf237aa34545b3795acb2e5c42d10e 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. Signed-Off-by: Waldemar Brodkorb <wbx@openadk.org>
  7. [Gerome: reformated as a Git patch]
  8. Signed-off-by: Gerome Burlats <gerome.burlats@smile.fr>
  9. [Romain: fix Waldemar's authorship in Git patch]
  10. Signed-off-by: Romain Naour <romain.naour@smile.fr>
  11. ---
  12. arch/arm/Kconfig | 11 +++++++++++
  13. arch/arm/Kconfig.debug | 3 ++-
  14. arch/arm/include/asm/mach/map.h | 1 +
  15. arch/arm/mach-versatile/Kconfig | 5 +++--
  16. arch/arm/mach-versatile/Makefile.boot | 3 +++
  17. arch/arm/mach-versatile/versatile_dt.c | 4 ++++
  18. 6 files changed, 24 insertions(+), 3 deletions(-)
  19. create mode 100644 arch/arm/mach-versatile/Makefile.boot
  20. diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
  21. index e8cd55a5b04c..fc2dbff70394 100644
  22. --- a/arch/arm/Kconfig
  23. +++ b/arch/arm/Kconfig
  24. @@ -353,6 +353,17 @@ config ARM_SINGLE_ARMV7M
  25. select SPARSE_IRQ
  26. select USE_OF
  27. +config ARM_SINGLE_ARCH_VERSATILE
  28. + bool "ARM Ltd. Versatile family"
  29. + depends on !MMU
  30. + select AUTO_ZRELADDR
  31. + select CLKSRC_OF
  32. + select COMMON_CLK
  33. + select GENERIC_CLOCKEVENTS
  34. + select GPIOLIB
  35. + select SPARSE_IRQ
  36. + select USE_OF
  37. +
  38. config ARCH_EBSA110
  39. bool "EBSA-110"
  40. select ARCH_USES_GETTIMEOFFSET
  41. diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
  42. index f6fcb8a79889..92fc637d3db8 100644
  43. --- a/arch/arm/Kconfig.debug
  44. +++ b/arch/arm/Kconfig.debug
  45. @@ -1843,7 +1843,8 @@ config DEBUG_UNCOMPRESS
  46. config UNCOMPRESS_INCLUDE
  47. string
  48. default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
  49. - PLAT_SAMSUNG || ARM_SINGLE_ARMV7M
  50. + PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \
  51. + ARM_SINGLE_ARCH_VERSATILE
  52. default "mach/uncompress.h"
  53. config EARLY_PRINTK
  54. diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
  55. index 9b7c328fb207..b1fe9c8b5c3e 100644
  56. --- a/arch/arm/include/asm/mach/map.h
  57. +++ b/arch/arm/include/asm/mach/map.h
  58. @@ -62,6 +62,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys,
  59. #else
  60. #define iotable_init(map,num) do { } while (0)
  61. #define vm_reserve_area_early(a,s,c) do { } while (0)
  62. +#define debug_ll_io_init() do { } while (0)
  63. #endif
  64. #endif
  65. diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
  66. index f5c275434d6c..06ad999d5978 100644
  67. --- a/arch/arm/mach-versatile/Kconfig
  68. +++ b/arch/arm/mach-versatile/Kconfig
  69. @@ -1,7 +1,8 @@
  70. # SPDX-License-Identifier: GPL-2.0
  71. config ARCH_VERSATILE
  72. - bool "ARM Ltd. Versatile family"
  73. - depends on ARCH_MULTI_V5
  74. + bool "ARM Ltd. Versatile family" if ARCH_MULTI_V5
  75. + depends on ARCH_MULTI_V5 || ARM_SINGLE_ARCH_VERSATILE
  76. + default y if ARM_SINGLE_ARCH_VERSATILE
  77. select ARM_AMBA
  78. select ARM_TIMER_SP804
  79. select ARM_VIC
  80. diff --git a/arch/arm/mach-versatile/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot
  81. new file mode 100644
  82. index 000000000000..eacfc3f5c33e
  83. --- /dev/null
  84. +++ b/arch/arm/mach-versatile/Makefile.boot
  85. @@ -0,0 +1,3 @@
  86. +# Empty file waiting for deletion once Makefile.boot isn't needed any more.
  87. +# Patch waits for application at
  88. +# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
  89. diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
  90. index 3c8d39c12909..8cfa05a37295 100644
  91. --- a/arch/arm/mach-versatile/versatile_dt.c
  92. +++ b/arch/arm/mach-versatile/versatile_dt.c
  93. @@ -37,7 +37,11 @@
  94. #include <asm/mach/map.h>
  95. /* macro to get at MMIO space when running virtually */
  96. +#ifdef CONFIG_MMU
  97. #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
  98. +#else
  99. +#define IO_ADDRESS(x) (x)
  100. +#endif
  101. #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n))
  102. /*
  103. --
  104. 2.14.5