Skip to contentSkip to conversation

ARM Realview multiplatform support

PATCH New Arnd Bergmann 2 participants 6 messages Feb 26, 2015 – Feb 27, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ARM Realview multiplatform support

This is from an old patch set of mine that I have decided to update to the latest kernel, hopefully getting it fully merged in 3.21.

We lose a few features here, but after discussions I've had in the past, it seems unlikely that anyone would miss them.

A few of the changes are for ARM core code and need at least an Ack from Russell, or we can try to have a shared git branch for these if necessary.

Please review.

Arnd Bergmann (10):
ARM: realview: remove sparsemem hack
ARM: realview: don't map undefined PCI registers clk/realview: stop using machine headers
ARM: no longer force unbuffered DMA for realview
ARM: realview: remove private barrier implementation
ARM: realview: enable multiplatform
ARM: integrator: use explicit core module options
ARM: no longer make CPU targets visible separately
ARM: realview: make all header files local
ARM: realview: clean up header files

[re-sent with correct mailing list address, sorry for duplicate
spam]

 arch/arm/Kconfig                                   |  16 ---
 arch/arm/mach-integrator/Kconfig                   | 132 ++++++++++++++++++---
 arch/arm/mach-realview/Kconfig                     |  65 +++++++---
 arch/arm/mach-realview/Makefile                    |   7 +-
 .../mach-realview/{include/mach => }/board-eb.h    |   4 +-
 .../{include/mach => }/board-pb1176.h              |   4 +-
 .../{include/mach => }/board-pb11mp.h              |   4 +-
 .../mach-realview/{include/mach => }/board-pba8.h  |   4 +-
 .../mach-realview/{include/mach => }/board-pbx.h   |   4 +-
 arch/arm/mach-realview/core.c                      |   6 +-
 arch/arm/mach-realview/core.h                      |   2 -
 .../mach-realview/{include/mach => }/hardware.h    |   2 -
 arch/arm/mach-realview/include/mach/barriers.h     |   8 --
 arch/arm/mach-realview/include/mach/irqs.h         |  40 -------
 arch/arm/mach-realview/include/mach/memory.h       |  64 ----------
 arch/arm/mach-realview/include/mach/uncompress.h   |  77 ------------
 .../arm/mach-realview/{include/mach => }/irqs-eb.h |  20 +---
 .../mach-realview/{include/mach => }/irqs-pb1176.h |  21 ----
 .../mach-realview/{include/mach => }/irqs-pb11mp.h |  27 +----
 .../mach-realview/{include/mach => }/irqs-pba8.h   |  23 ----
 .../mach-realview/{include/mach => }/irqs-pbx.h    |  24 +---
 .../mach-realview/{include/mach => }/platform.h    |   2 -
 arch/arm/mach-realview/platsmp.c                   |   8 +-
 arch/arm/mach-realview/realview-dt.c               |   1 -
 arch/arm/mach-realview/realview_eb.c               |  12 +-
 arch/arm/mach-realview/realview_pb1176.c           |   6 +-
 arch/arm/mach-realview/realview_pb11mp.c           |  11 +-
 arch/arm/mach-realview/realview_pba8.c             |  14 +--
 arch/arm/mach-realview/realview_pbx.c              |  14 +--
 arch/arm/mm/Kconfig                                |  32 +++--
 drivers/clk/versatile/clk-realview.c               |  10 +-
 31 files changed, 232 insertions(+), 432 deletions(-)
 rename arch/arm/mach-realview/{include/mach => }/board-eb.h (97%)
 rename arch/arm/mach-realview/{include/mach => }/board-pb1176.h (97%)
 rename arch/arm/mach-realview/{include/mach => }/board-pb11mp.h (98%)
 rename arch/arm/mach-realview/{include/mach => }/board-pba8.h (97%)
 rename arch/arm/mach-realview/{include/mach => }/board-pbx.h (98%)
 rename arch/arm/mach-realview/{include/mach => }/hardware.h (95%)
 delete mode 100644 arch/arm/mach-realview/include/mach/barriers.h
 delete mode 100644 arch/arm/mach-realview/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-realview/include/mach/memory.h
 delete mode 100644 arch/arm/mach-realview/include/mach/uncompress.h
 rename arch/arm/mach-realview/{include/mach => }/irqs-eb.h (91%)
 rename arch/arm/mach-realview/{include/mach => }/irqs-pb1176.h (88%)
 rename arch/arm/mach-realview/{include/mach => }/irqs-pb11mp.h (90%)
 rename arch/arm/mach-realview/{include/mach => }/irqs-pba8.h (87%)
 rename arch/arm/mach-realview/{include/mach => }/irqs-pbx.h (90%)
 rename arch/arm/mach-realview/{include/mach => }/platform.h (99%)
Signature · 1 line
2.1.0.rc2
#1 lore raw

PATCH 1/10 ARM: realview: remove sparsemem hack

The realview-pbx platform has an elaborate way of avoiding the use of highmem by redefining its phys_to_virt function. In practice this doesn't help all that much, and it gets in the way of doing multiplatform builds for realview.

This removes the feature and kills off the mach/memory.h file for realview. We also lose the ability to do sparsemem with this patch, but that should be put back into place for generic multiplatform configurations, to save a little memory on PBX.

---
 arch/arm/Kconfig                             |  2 -
 arch/arm/mach-realview/Kconfig               |  5 +--
 arch/arm/mach-realview/include/mach/memory.h | 64 ----------------------------
 3 files changed, 2 insertions(+), 69 deletions(-)
 delete mode 100644 arch/arm/mach-realview/include/mach/memory.h
arch/arm/Kconfig +0 -2
index 9f1f09a2bc9b..44e5879e4efc 100644
@@ -233,7 +233,6 @@ config ARM_PATCH_PHYS_VIRT
 	bool "Patch physical to virtual translations at runtime" if EMBEDDED
 	default y
 	depends on !XIP_KERNEL && MMU
-	depends on !ARCH_REALVIEW || !SPARSEMEM
 	help
 	  Patch phys-to-virt and virt-to-phys translation functions at
 	  boot and module load time according to the position of the
@@ -333,7 +332,6 @@ config ARCH_REALVIEW
 	select GENERIC_CLOCKEVENTS
 	select GPIO_PL061 if GPIOLIB
 	select ICST
-	select NEED_MACH_MEMORY_H
 	select PLAT_VERSATILE
 	select PLAT_VERSATILE_SCHED_CLOCK
 	help
arch/arm/mach-realview/Kconfig +2 -3
index 565925f37dc5..0fe63b543f5b 100644
@@ -102,14 +102,13 @@ config MACH_REALVIEW_PBA8
 
 config MACH_REALVIEW_PBX
 	bool "Support RealView(R) Platform Baseboard Explore"
-	select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET
 	select ARM_GIC
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
 	select HAVE_PATA_PLATFORM
 	select HAVE_SMP
 	select MIGHT_HAVE_CACHE_L2X0
-	select ZONE_DMA if SPARSEMEM
+	select ZONE_DMA
 	help
 	  Include support for the ARM(R) RealView(R) Platform Baseboard
 	  Explore.
@@ -124,6 +123,6 @@ config REALVIEW_HIGH_PHYS_OFFSET
 	  the board supports 512MB of RAM, this option allows the
 	  memory to be accessed contiguously at the high physical
 	  offset. On the PBX board, disabling this option allows 1GB of
-	  RAM to be used with SPARSEMEM.
+	  RAM to be used with HIGHMEM.
 
 endmenu
arch/arm/mach-realview/include/mach/memory.h deleted +0 -64

64 lines not on this page · raw message

Signature · 1 line
2.1.0.rc2
#2 lore raw

PATCH 1/10 ARM: realview: remove sparsemem hack

Quoted 11 lines · Arnd Bergmann

The realview-pbx platform has an elaborate way of avoiding the use of highmem by redefining its phys_to_virt function. In practice this doesn't help all that much, and it gets in the way of doing multiplatform builds for realview.

This removes the feature and kills off the mach/memory.h file for realview. We also lose the ability to do sparsemem with this patch, but that should be put back into place for generic multiplatform configurations, to save a little memory on PBX.

Yours,
Linus Walleij

#3 lore raw

PATCH 2/10 ARM: realview: don't map undefined PCI registers

In reply to Arnd Bergmann

PCI support for realview was never merged, and trying to build realview with CONFIG_PCI enabled fails because the constants for the mapping windows are not defined anywhere.

This removes them from the static I/O window mapping table as a preparation for multiplatform support.

---
 arch/arm/mach-realview/realview_pba8.c | 8 --------
 arch/arm/mach-realview/realview_pbx.c  | 8 --------
 2 files changed, 16 deletions(-)
arch/arm/mach-realview/realview_pba8.c +0 -8
index 4c64662f5437..b3549a637ff0 100644
@@ -77,14 +77,6 @@ static struct map_desc realview_pba8_io_desc[] __initdata = {
 		.length		= SZ_4K,
 		.type		= MT_DEVICE,
 	},
-#ifdef CONFIG_PCI
-	{
-		.virtual	= PCIX_UNIT_BASE,
-		.pfn		= __phys_to_pfn(REALVIEW_PBA8_PCI_BASE),
-		.length		= REALVIEW_PBA8_PCI_BASE_SIZE,
-		.type		= MT_DEVICE
-	},
-#endif
 #ifdef CONFIG_DEBUG_LL
 	{
 		.virtual	= IO_ADDRESS(REALVIEW_PBA8_UART0_BASE),
arch/arm/mach-realview/realview_pbx.c +0 -8
index 9a22b864219f..f26e1e09f29e 100644
@@ -79,14 +79,6 @@ static struct map_desc realview_pbx_io_desc[] __initdata = {
 		.length		= SZ_4K,
 		.type		= MT_DEVICE,
 	},
-#ifdef CONFIG_PCI
-	{
-		.virtual	= PCIX_UNIT_BASE,
-		.pfn		= __phys_to_pfn(REALVIEW_PBX_PCI_BASE),
-		.length		= REALVIEW_PBX_PCI_BASE_SIZE,
-		.type		= MT_DEVICE,
-	},
-#endif
 #ifdef CONFIG_DEBUG_LL
 	{
 		.virtual	= IO_ADDRESS(REALVIEW_PBX_UART0_BASE),
Signature · 1 line
2.1.0.rc2
#4 lore raw

PATCH 2/10 ARM: realview: don't map undefined PCI registers

Quoted 8 lines · Arnd Bergmann

PCI support for realview was never merged, and trying to build realview with CONFIG_PCI enabled fails because the constants for the mapping windows are not defined anywhere.

This removes them from the static I/O window mapping table as a preparation for multiplatform support.

Yours,
Linus Walleij

#5 lore raw

PATCH 3/10 clk/realview: stop using machine headers

In reply to Arnd Bergmann

In order to move realview into multiplatform, we have to prevent device drivers from accessing the machine header files.

In case of the clk driver, this is very simple, we just copy the small set of register definitions into the driver that needs them.

---
 drivers/clk/versatile/clk-realview.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/clk/versatile/clk-realview.c +7 -3
index c8b523117fb7..276411f3c437 100644
@@ -12,11 +12,15 @@
 #include <linux/io.h>
 #include <linux/clk-provider.h>
 
-#include <mach/hardware.h>
-#include <mach/platform.h>
-
 #include "clk-icst.h"
 
+#define REALVIEW_SYS_OSC0_OFFSET             0x0C
+#define REALVIEW_SYS_OSC1_OFFSET             0x10
+#define REALVIEW_SYS_OSC2_OFFSET             0x14
+#define REALVIEW_SYS_OSC3_OFFSET             0x18
+#define REALVIEW_SYS_OSC4_OFFSET             0x1C	/* OSC1 for RealView/AB */
+#define REALVIEW_SYS_LOCK_OFFSET             0x20
+
 /*
  * Implementation of the ARM RealView clock trees.
  */
Signature · 1 line
2.1.0.rc2