Skip to contentSkip to conversation

ARM Versatile multi-platform support

PATCH New Rob Herring 4 participants 12 messages Dec 8, 2015 – Dec 17, 2015

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

cover ARM Versatile multi-platform support

Arnd lit a fire under me to dust this off and get it merged. So here it is. The main change from prior version is I merged all the code to a single file. It's a bigger patch than I'd like, but I don't think trying to do it in multiple steps is worth it.

This is dependent on some solution for the default platform choice on !MMU builds (allnoconfig) as it can't be Versatile after this series. Arnd has some ideas on how to address that.

This is tested under QEMU. Linus previously tested this on actual h/w and had a problem with the display identification which needs investigation or agreement to worry about it if and when someone actually cares.

Rob

Rob Herring (4):
ARM: versatile: add DT based PCI detection
ARM: versatile: switch to DT only booting and remove legacy code
ARM: versatile: merge mach code into a single file
ARM: versatile: convert to multi-platform

 arch/arm/Kconfig                                  |  17 -
 arch/arm/configs/versatile_defconfig              |   2 +-
 arch/arm/mach-versatile/Kconfig                   |  41 +-
 arch/arm/mach-versatile/Makefile                  |   6 +-
 arch/arm/mach-versatile/Makefile.boot             |   4 -
 arch/arm/mach-versatile/core.c                    | 808 ----------------------
 arch/arm/mach-versatile/core.h                    |  46 --
 arch/arm/mach-versatile/include/mach/clkdev.h     |  16 -
 arch/arm/mach-versatile/include/mach/hardware.h   |  38 -
 arch/arm/mach-versatile/include/mach/irqs.h       | 134 ----
 arch/arm/mach-versatile/include/mach/platform.h   | 416 -----------
 arch/arm/mach-versatile/include/mach/uncompress.h |  45 --
 arch/arm/mach-versatile/pci.c                     | 368 ----------
 arch/arm/mach-versatile/versatile_ab.c            |  44 --
 arch/arm/mach-versatile/versatile_dt.c            | 376 +++++++++-
 arch/arm/mach-versatile/versatile_pb.c            |  91 ---
 drivers/clk/versatile/Kconfig                     |   4 +-
 17 files changed, 392 insertions(+), 2064 deletions(-)
 delete mode 100644 arch/arm/mach-versatile/Makefile.boot
 delete mode 100644 arch/arm/mach-versatile/core.c
 delete mode 100644 arch/arm/mach-versatile/core.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/clkdev.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/platform.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-versatile/pci.c
 delete mode 100644 arch/arm/mach-versatile/versatile_ab.c
 delete mode 100644 arch/arm/mach-versatile/versatile_pb.c
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/4 ARM: versatile: add DT based PCI detection

Disable the Versatile PCI DT node when no PCI backplane is detected. This will prevent the Versatile PCI driver from probing when PCI is not populated.

Cc Russell King <[email protected]>
Cc Linus Walleij <[email protected]>
---
 arch/arm/mach-versatile/versatile_dt.c | 50 ++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
arch/arm/mach-versatile/versatile_dt.c +50 -0
index 7de3e92..a585758 100644
@@ -22,15 +22,65 @@
  */
 
 #include <linux/init.h>
+#include <linux/io.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
+#include <linux/slab.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
 #include "core.h"
 
+#define VERSATILE_SYS_PCICTL_OFFSET           0x44
+static void __iomem *versatile_sys_base;
+
+static void __init versatile_dt_pci_init(void)
+{
+	u32 val;
+	struct device_node *np;
+	struct property *newprop;
+
+	np = of_find_compatible_node(NULL, NULL, "arm,versatile-pci");
+	if (!np)
+		return;
+
+	/* Check if PCI backplane is detected */
+	val = readl(versatile_sys_base + VERSATILE_SYS_PCICTL_OFFSET);
+	if (val & 1) {
+		/*
+		 * Enable PCI accesses. Note that the documentaton is
+		 * inconsistent whether or not this is needed, but the old
+		 * driver had it so we will keep it.
+		 */
+		writel(1, versatile_sys_base + VERSATILE_SYS_PCICTL_OFFSET);
+		return;
+	}
+
+	newprop = kzalloc(sizeof(*newprop), GFP_KERNEL);
+	if (!newprop)
+		return;
+
+	newprop->name = kstrdup("status", GFP_KERNEL);
+	newprop->value = kstrdup("disabled", GFP_KERNEL);
+	newprop->length = sizeof("disabled");
+	of_update_property(np, newprop);
+
+	pr_info("Not plugged into PCI backplane!\n");
+}
+
 static void __init versatile_dt_init(void)
 {
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "arm,core-module-versatile");
+	if (np)
+		versatile_sys_base = of_iomap(np, 0);
+	WARN_ON(!versatile_sys_base);
+
+	versatile_dt_pci_init();
+
 	of_platform_populate(NULL, of_default_bus_match_table,
 			     versatile_auxdata_lookup, NULL);
 }
Signature · 1 line
2.5.0
#2 lore raw

PATCH 2/4 ARM: versatile: switch to DT only booting and remove legacy code

In reply to Rob Herring

With DT support for clocks, irqchips, timers, and PCI now in place, DT based booting has feature parity with non-DT legacy boot. The final piece is actually enabling common clock support on Versatile. Enabling full DT support requires either removing the old Versatile clock code, updating the legacy boot to use the common clock code, or making DT and legacy boot mutually exclusive. Given that removing legacy boot code is the goal anyway, I am going with the 1st option.

Cc Russell King <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Mike Turquette <[email protected]>
---
 arch/arm/Kconfig                                |  13 +-
 arch/arm/mach-versatile/Kconfig                 |  33 --
 arch/arm/mach-versatile/Makefile                |   6 +-
 arch/arm/mach-versatile/core.c                  | 497 +-----------------------
 arch/arm/mach-versatile/core.h                  |   9 +-
 arch/arm/mach-versatile/include/mach/clkdev.h   |  16 -
 arch/arm/mach-versatile/include/mach/hardware.h |   6 -
 arch/arm/mach-versatile/include/mach/irqs.h     | 134 -------
 arch/arm/mach-versatile/include/mach/platform.h | 174 ---------
 arch/arm/mach-versatile/pci.c                   | 368 ------------------
 arch/arm/mach-versatile/versatile_ab.c          |  44 ---
 arch/arm/mach-versatile/versatile_dt.c          |   1 +
 arch/arm/mach-versatile/versatile_pb.c          |  91 -----
 drivers/clk/versatile/Kconfig                   |   4 +-
 14 files changed, 24 insertions(+), 1372 deletions(-)
 delete mode 100644 arch/arm/mach-versatile/Kconfig
 delete mode 100644 arch/arm/mach-versatile/include/mach/clkdev.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-versatile/pci.c
 delete mode 100644 arch/arm/mach-versatile/versatile_ab.c
 delete mode 100644 arch/arm/mach-versatile/versatile_pb.c
arch/arm/Kconfig +7 -6
index ab1cc50..dcbcce0 100644
@@ -368,13 +368,16 @@ config ARCH_VERSATILE
 	select ARM_AMBA
 	select ARM_TIMER_SP804
 	select ARM_VIC
-	select CLKDEV_LOOKUP
+	select CLKSRC_VERSATILE
+	select COMMON_CLK
+	select COMMON_CLK_VERSATILE
+	select CPU_ARM926T
 	select GENERIC_CLOCKEVENTS
-	select HAVE_MACH_CLKDEV
 	select ICST
 	select PLAT_VERSATILE
-	select PLAT_VERSATILE_CLOCK
-	select PLAT_VERSATILE_SCHED_CLOCK
+	select MIGHT_HAVE_PCI
+	select SPARSE_IRQ
+	select USE_OF
 	select VERSATILE_FPGA_IRQ
 	help
 	  This enables support for ARM Ltd Versatile board.
@@ -926,8 +929,6 @@ source "arch/arm/mach-uniphier/Kconfig"
 
 source "arch/arm/mach-ux500/Kconfig"
 
-source "arch/arm/mach-versatile/Kconfig"
-
 source "arch/arm/mach-vexpress/Kconfig"
 source "arch/arm/plat-versatile/Kconfig"
 
arch/arm/mach-versatile/Kconfig deleted +0 -33
deleted file mode 100644
index 1dba368..0000000
@@ -1,33 +0,0 @@
-menu "Versatile platform type"
-	depends on ARCH_VERSATILE
-
-config ARCH_VERSATILE_PB
-	bool "Support Versatile Platform Baseboard for ARM926EJ-S"
-	default y
-	select CPU_ARM926T
-	select MIGHT_HAVE_PCI
-	help
-	  Include support for the ARM(R) Versatile Platform Baseboard
-	  for the ARM926EJ-S.
-
-config MACH_VERSATILE_AB
-	bool "Support Versatile Application Baseboard for ARM926EJ-S"
-	select CPU_ARM926T
-	help
-	  Include support for the ARM(R) Versatile Application Baseboard
-	  for the ARM926EJ-S.
-
-config MACH_VERSATILE_DT
-	bool "Support Versatile platform from device tree"
-	select CPU_ARM926T
-	select USE_OF
-	help
-	  Include support for the ARM(R) Versatile/PB platform,
-	  using the device tree for discovery
-
-config MACH_VERSATILE_AUTO
-	def_bool y
-	depends on !ARCH_VERSATILE_PB && !MACH_VERSATILE_AB
-	select MACH_VERSATILE_DT
-
-endmenu
arch/arm/mach-versatile/Makefile +1 -5
index 81fa3fe..ccef512 100644
@@ -2,8 +2,4 @@
 # Makefile for the linux kernel.
 #
 
-obj-y					:= core.o
-obj-$(CONFIG_ARCH_VERSATILE_PB)		+= versatile_pb.o
-obj-$(CONFIG_MACH_VERSATILE_AB)		+= versatile_ab.o
-obj-$(CONFIG_MACH_VERSATILE_DT)		+= versatile_dt.o
-obj-$(CONFIG_PCI)			+= pci.o
+obj-y					:= core.o versatile_dt.o
arch/arm/mach-versatile/core.c +10 -487

614 lines not on this page · raw message

arch/arm/mach-versatile/core.h +2 -7
index f06d576..c3d7157 100644
@@ -26,7 +26,8 @@
 #include <linux/of_platform.h>
 #include <linux/reboot.h>
 
-extern void __init versatile_init(void);
+extern struct platform_device versatile_flash_device;
+
 extern void __init versatile_init_early(void);
 extern void __init versatile_init_irq(void);
 extern void __init versatile_map_io(void);
@@ -37,10 +38,4 @@ extern unsigned int mmc_status(struct device *dev);
 extern struct of_dev_auxdata versatile_auxdata_lookup[];
 #endif
 
-#define APB_DEVICE(name, busid, base, plat)	\
-static AMBA_APB_DEVICE(name, busid, 0, VERSATILE_##base##_BASE, base##_IRQ, plat)
-
-#define AHB_DEVICE(name, busid, base, plat)	\
-static AMBA_AHB_DEVICE(name, busid, 0, VERSATILE_##base##_BASE, base##_IRQ, plat)
-
 #endif
arch/arm/mach-versatile/include/mach/clkdev.h deleted +0 -16
deleted file mode 100644
index e58d077..0000000
@@ -1,16 +0,0 @@
-#ifndef __ASM_MACH_CLKDEV_H
-#define __ASM_MACH_CLKDEV_H
-
-#include <plat/clock.h>
-
-struct clk {
-	unsigned long		rate;
-	const struct clk_ops	*ops;
-	const struct icst_params *params;
-	void __iomem		*vcoreg;
-};
-
-#define __clk_get(clk) ({ 1; })
-#define __clk_put(clk) do { } while (0)
-
-#endif
arch/arm/mach-versatile/include/mach/hardware.h +0 -6
index 3e5d425..22a1158 100644
@@ -24,12 +24,6 @@
 
 #include <asm/sizes.h>
 
-/*
- * PCI space virtual addresses
- */
-#define VERSATILE_PCI_VIRT_BASE		(void __iomem *)0xe8000000ul
-#define VERSATILE_PCI_CFG_VIRT_BASE	(void __iomem *)0xe9000000ul
-
 /* macro to get at MMIO space when running virtually */
 #define IO_ADDRESS(x)		(((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
 
arch/arm/mach-versatile/include/mach/irqs.h deleted +0 -134

134 lines not on this page · raw message

arch/arm/mach-versatile/include/mach/platform.h +0 -174

207 lines not on this page · raw message

arch/arm/mach-versatile/pci.c deleted +0 -368

368 lines not on this page · raw message

arch/arm/mach-versatile/versatile_ab.c deleted +0 -44

44 lines not on this page · raw message

arch/arm/mach-versatile/versatile_dt.c +1 -0
index a585758..86fa2d3 100644
@@ -81,6 +81,7 @@ static void __init versatile_dt_init(void)
 
 	versatile_dt_pci_init();
 
+	platform_device_register(&versatile_flash_device);
 	of_platform_populate(NULL, of_default_bus_match_table,
 			     versatile_auxdata_lookup, NULL);
 }
arch/arm/mach-versatile/versatile_pb.c deleted +0 -91

91 lines not on this page · raw message

drivers/clk/versatile/Kconfig +3 -1
index fc50b62..369a2dc 100644
@@ -1,6 +1,8 @@
 config COMMON_CLK_VERSATILE
 	bool "Clock driver for ARM Reference designs"
-	depends on ARCH_INTEGRATOR || ARCH_REALVIEW || ARCH_VEXPRESS || ARM64 || COMPILE_TEST
+	depends on ARCH_INTEGRATOR || ARCH_REALVIEW || \
+		ARCH_VERSATILE || ARCH_VEXPRESS || ARM64 || \
+		COMPILE_TEST
 	---help---
           Supports clocking on ARM Reference designs:
 	  - Integrator/AP and Integrator/CP
Signature · 1 line
2.5.0
#3 lore raw

PATCH 3/4 ARM: versatile: merge mach code into a single file

In reply to Rob Herring

With DT-only support now in place and most of the legacy code removed, the separation of core.c and versatile_dt.c makes little sense. The headers in mach include directory also have to move for multi-platform support, but with a single .c file the remaining definitions needed can also be moved into the versatile_dt.c.

In the move, the system registers and IB2 registers are converted to run-time mappings and all register accesses converted to use readl/writel.

Cc Russell King <[email protected]>
Cc Linus Walleij <[email protected]>
---
 arch/arm/mach-versatile/Makefile                |   2 +-
 arch/arm/mach-versatile/core.c                  | 331 ------------------------
 arch/arm/mach-versatile/core.h                  |  41 ---
 arch/arm/mach-versatile/include/mach/hardware.h |  32 ---
 arch/arm/mach-versatile/include/mach/platform.h | 242 -----------------
 arch/arm/mach-versatile/versatile_dt.c          | 325 ++++++++++++++++++++++-
 6 files changed, 325 insertions(+), 648 deletions(-)
 delete mode 100644 arch/arm/mach-versatile/core.c
 delete mode 100644 arch/arm/mach-versatile/core.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/platform.h
arch/arm/mach-versatile/Makefile +1 -1
index ccef512..41b124b 100644
@@ -2,4 +2,4 @@
 # Makefile for the linux kernel.
 #
 
-obj-y					:= core.o versatile_dt.o
+obj-y					:= versatile_dt.o
arch/arm/mach-versatile/core.c deleted +0 -331

331 lines not on this page · raw message

arch/arm/mach-versatile/core.h deleted +0 -41

41 lines not on this page · raw message

arch/arm/mach-versatile/include/mach/hardware.h deleted +0 -32
deleted file mode 100644
index 22a1158..0000000
@@ -1,32 +0,0 @@
-/*
- *  arch/arm/mach-versatile/include/mach/hardware.h
- *
- *  This file contains the hardware definitions of the Versatile boards.
- *
- *  Copyright (C) 2003 ARM Limited.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-#include <asm/sizes.h>
-
-/* macro to get at MMIO space when running virtually */
-#define IO_ADDRESS(x)		(((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
-
-#define __io_address(n)		((void __iomem __force *)IO_ADDRESS(n))
-
-#endif
arch/arm/mach-versatile/include/mach/platform.h deleted +0 -242

242 lines not on this page · raw message

arch/arm/mach-versatile/versatile_dt.c +324 -1

343 lines not on this page · raw message

Signature · 1 line
2.5.0
#4 lore raw

PATCH 4/4 ARM: versatile: convert to multi-platform

In reply to Rob Herring

Now that all the prerequisites are in place, we can enable Versatile boards for multi-platform kernels.

Cc Russell King <[email protected]>
Cc Linus Walleij <[email protected]>
---
 arch/arm/Kconfig                                  | 22 +----------
 arch/arm/configs/versatile_defconfig              |  2 +-
 arch/arm/mach-versatile/Kconfig                   | 16 ++++++++
 arch/arm/mach-versatile/Makefile.boot             |  4 --
 arch/arm/mach-versatile/include/mach/uncompress.h | 45 -----------------------
 5 files changed, 19 insertions(+), 70 deletions(-)
 create mode 100644 arch/arm/mach-versatile/Kconfig
 delete mode 100644 arch/arm/mach-versatile/Makefile.boot
 delete mode 100644 arch/arm/mach-versatile/include/mach/uncompress.h
arch/arm/Kconfig +2 -20
index dcbcce0..3db095e 100644
@@ -362,26 +362,6 @@ config ARCH_REALVIEW
 	help
 	  This enables support for ARM Ltd RealView boards.
 
-config ARCH_VERSATILE
-	bool "ARM Ltd. Versatile family"
-	select ARCH_WANT_OPTIONAL_GPIOLIB
-	select ARM_AMBA
-	select ARM_TIMER_SP804
-	select ARM_VIC
-	select CLKSRC_VERSATILE
-	select COMMON_CLK
-	select COMMON_CLK_VERSATILE
-	select CPU_ARM926T
-	select GENERIC_CLOCKEVENTS
-	select ICST
-	select PLAT_VERSATILE
-	select MIGHT_HAVE_PCI
-	select SPARSE_IRQ
-	select USE_OF
-	select VERSATILE_FPGA_IRQ
-	help
-	  This enables support for ARM Ltd Versatile board.
-
 config ARCH_CLPS711X
 	bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
 	select ARCH_REQUIRE_GPIOLIB
@@ -929,6 +909,8 @@ source "arch/arm/mach-uniphier/Kconfig"
 
 source "arch/arm/mach-ux500/Kconfig"
 
+source "arch/arm/mach-versatile/Kconfig"
+
 source "arch/arm/mach-vexpress/Kconfig"
 source "arch/arm/plat-versatile/Kconfig"
 
arch/arm/configs/versatile_defconfig +1 -1
index ea49d37..01f402d 100644
@@ -6,8 +6,8 @@ CONFIG_SLAB=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_VERSATILE=y
-CONFIG_MACH_VERSATILE_AB=y
 CONFIG_AEABI=y
 CONFIG_OABI_COMPAT=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
arch/arm/mach-versatile/Kconfig new file +16 -0
new file mode 100644
index 0000000..e40f777
@@ -0,0 +1,16 @@
+config ARCH_VERSATILE
+	bool "ARM Ltd. Versatile family"
+	depends on ARCH_MULTI_V5
+	select ARM_AMBA
+	select ARM_TIMER_SP804
+	select ARM_VIC
+	select CLKSRC_VERSATILE
+	select COMMON_CLK_VERSATILE
+	select CPU_ARM926T
+	select ICST
+	select MIGHT_HAVE_PCI
+	select PLAT_VERSATILE
+	select VERSATILE_FPGA_IRQ
+	help
+	  This enables support for ARM Ltd Versatile board.
+
arch/arm/mach-versatile/Makefile.boot deleted +0 -4
deleted file mode 100644
index ff0a4b5..0000000
@@ -1,4 +0,0 @@
-   zreladdr-y	+= 0x00008000
-params_phys-y	:= 0x00000100
-initrd_phys-y	:= 0x00800000
-
arch/arm/mach-versatile/include/mach/uncompress.h deleted +0 -45

45 lines not on this page · raw message

Signature · 1 line
2.5.0
#5 lore raw

cover ARM Versatile multi-platform support

In reply to Rob Herring
Quoted 5 lines · Rob Herring

Arnd lit a fire under me to dust this off and get it merged. So here it is. The main change from prior version is I merged all the code to a single file. It's a bigger patch than I'd like, but I don't think trying to do it in multiple steps is worth it.

Quoted 8 lines

This is dependent on some solution for the default platform choice on !MMU builds (allnoconfig) as it can't be Versatile after this series. Arnd has some ideas on how to address that.

This is tested under QEMU. Linus previously tested this on actual h/w and had a problem with the display identification which needs investigation or agreement to worry about it if and when someone actually cares.

I handed my PB hardware and its PCI backplane back to Will and Marc some time back, so they're in the best position to do testing of the PCI part on real hardware if needed these days.

thanks
-- PMM

#6 lore raw

cover ARM Versatile multi-platform support

Quoted 10 lines · Peter Maydell
Quoted 9 lines · Rob Herring

Arnd lit a fire under me to dust this off and get it merged. So here it is. The main change from prior version is I merged all the code to a single file. It's a bigger patch than I'd like, but I don't think trying to do it in multiple steps is worth it.

This is dependent on some solution for the default platform choice on !MMU builds (allnoconfig) as it can't be Versatile after this series. Arnd has some ideas on how to address that.

Quoted 8 lines
Quoted 4 lines

This is tested under QEMU. Linus previously tested this on actual h/w and had a problem with the display identification which needs investigation or agreement to worry about it if and when someone actually cares.

I handed my PB hardware and its PCI backplane back to Will and Marc some time back, so they're in the best position to do testing of the PCI part on real hardware if needed these days.

I don't really have the bandwidth to test that stuff right now, but I recently managed to score a few PCI backplanes (backplane only, without the massive case, so an ATX power supply is required to make use of it). Some documentation is available at [1].

I could easily be convinced to part with one of them, and even drop it at a suitably located Linaro office, if that helps...

Thanks,

	M.

[1] http://infocenter.arm.com/help/topic/com.arm.doc.dui0425f/Cfhffaei.html

Signature · 1 line
Jazz is not dead. It just smells funny...
#7 lore raw

cover ARM Versatile multi-platform support

Quoted 20 lines · Marc Zyngier
Quoted 10 lines · Peter Maydell
Quoted 9 lines · Rob Herring

Arnd lit a fire under me to dust this off and get it merged. So here it is. The main change from prior version is I merged all the code to a single file. It's a bigger patch than I'd like, but I don't think trying to do it in multiple steps is worth it.

This is dependent on some solution for the default platform choice on !MMU builds (allnoconfig) as it can't be Versatile after this series. Arnd has some ideas on how to address that.

Quoted 8 lines
Quoted 4 lines

This is tested under QEMU. Linus previously tested this on actual h/w and had a problem with the display identification which needs investigation or agreement to worry about it if and when someone actually cares.

I handed my PB hardware and its PCI backplane back to Will and Marc some time back, so they're in the best position to do testing of the PCI part on real hardware if needed these days.

Quoted 7 lines

I don't really have the bandwidth to test that stuff right now, but I recently managed to score a few PCI backplanes (backplane only, without the massive case, so an ATX power supply is required to make use of it). Some documentation is available at [1].

I could easily be convinced to part with one of them, and even drop it at a suitably located Linaro office, if that helps...

How about in a canal? That will cut the install base in half. ;)

We'll settle for an ack meaning "I don't have time to test, working for qemu is good enough, we should merge this anyway and can pick up the pieces later if any of the 2 or 3 people that have a system ever really care."

Rob

#8 lore raw

cover ARM Versatile multi-platform support

Quoted 26 lines · Rob Herring
Quoted 25 lines · Marc Zyngier
Quoted 10 lines · Peter Maydell
Quoted 9 lines · Rob Herring

Arnd lit a fire under me to dust this off and get it merged. So here it is. The main change from prior version is I merged all the code to a single file. It's a bigger patch than I'd like, but I don't think trying to do it in multiple steps is worth it.

This is dependent on some solution for the default platform choice on !MMU builds (allnoconfig) as it can't be Versatile after this series. Arnd has some ideas on how to address that.

Quoted 8 lines
Quoted 4 lines

This is tested under QEMU. Linus previously tested this on actual h/w and had a problem with the display identification which needs investigation or agreement to worry about it if and when someone actually cares.

I handed my PB hardware and its PCI backplane back to Will and Marc some time back, so they're in the best position to do testing of the PCI part on real hardware if needed these days.

I don't really have the bandwidth to test that stuff right now, but I recently managed to score a few PCI backplanes (backplane only, without the massive case, so an ATX power supply is required to make use of it). Some documentation is available at [1].

Quoted 4 lines
Quoted 2 lines

I could easily be convinced to part with one of them, and even drop it at a suitably located Linaro office, if that helps...

How about in a canal? That will cut the install base in half. ;)

I believe Will would object to fishing the backplane out of the canal instead of a trout.

Quoted 4 lines

We'll settle for an ack meaning "I don't have time to test, working for qemu is good enough, we should merge this anyway and can pick up the pieces later if any of the 2 or 3 people that have a system ever really care."

Works for me:

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#9 lore raw

cover ARM Versatile multi-platform support

In reply to Rob Herring
Quoted 5 lines · On Tuesday 08 December 2015 14:44:14 Rob Herring wrote:

Arnd lit a fire under me to dust this off and get it merged. So here it is. The main change from prior version is I merged all the code to a single file. It's a bigger patch than I'd like, but I don't think trying to do it in multiple steps is worth it.

Quoted 8 lines

This is dependent on some solution for the default platform choice on !MMU builds (allnoconfig) as it can't be Versatile after this series. Arnd has some ideas on how to address that.

This is tested under QEMU. Linus previously tested this on actual h/w and had a problem with the display identification which needs investigation or agreement to worry about it if and when someone actually cares.

Merged into next/multiplatform, thanks a lot!

Arnd

#10 lore raw

cover ARM Versatile multi-platform support

Quoted 10 lines · Arnd Bergmann
Quoted 9 lines · On Tuesday 08 December 2015 14:44:14 Rob Herring wrote:

Arnd lit a fire under me to dust this off and get it merged. So here it is. The main change from prior version is I merged all the code to a single file. It's a bigger patch than I'd like, but I don't think trying to do it in multiple steps is worth it.

This is dependent on some solution for the default platform choice on !MMU builds (allnoconfig) as it can't be Versatile after this series. Arnd has some ideas on how to address that.

Quoted 7 lines
Quoted 4 lines

This is tested under QEMU. Linus previously tested this on actual h/w and had a problem with the display identification which needs investigation or agreement to worry about it if and when someone actually cares.

Merged into next/multiplatform, thanks a lot!

Are you going to apply something for the default platform? This is breaking allnoconfig without it.

It looks like versatile_defconfig is also broken, but perhaps due to debug_ll changes?

Rob

#11 lore raw

cover ARM Versatile multi-platform support

Quoted 17 lines · On Thursday 17 December 2015 08:53:09 Rob Herring wrote:
Quoted 16 lines · Arnd Bergmann
Quoted 13 lines · On Tuesday 08 December 2015 14:44:14 Rob Herring wrote:

Arnd lit a fire under me to dust this off and get it merged. So here it is. The main change from prior version is I merged all the code to a single file. It's a bigger patch than I'd like, but I don't think trying to do it in multiple steps is worth it.

This is dependent on some solution for the default platform choice on !MMU builds (allnoconfig) as it can't be Versatile after this series. Arnd has some ideas on how to address that.

This is tested under QEMU. Linus previously tested this on actual h/w and had a problem with the display identification which needs investigation or agreement to worry about it if and when someone actually cares.

Quoted 4 lines
Quoted 1 line

Merged into next/multiplatform, thanks a lot!

Are you going to apply something for the default platform? This is breaking allnoconfig without it.

Thanks for the reminder, I have committed this patch on top now,

Quoted 1 line

From 70722803de91a7670979dcb5748631b4e3c1b219 Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Thu, 17 Dec 2015 17:45:47 +0100
Subject: [PATCH] ARM: make default platform work for NOMMU

Moving ARCH_VERSATILE into ARCH_MULTIPLATFORM means that it no longer works as the default target for MMU-less kernels. While we might want to get that working again in the future, it's also a rather bad default, and it makes sense to make ARM_SINGLE_V7M the default because that is what realistically all NOMMU users on ARM are using, and it actually is what gets selected by default in the absence of versatile in the choice statement.

Related to this, 'allnoconfig' kernels fail to link with the new default, as they do not include a machine record:

arm-linux-gnueabi-ld: no machine record defined

For ARCH_MULTIPLATFORM kernels, we avoid this error by using a default machine descriptor that works for all trivial platforms, like ARCH_VIRT. The same reasoning applies for ARM_SINGLE_V7M, as that can also boot with empty machine descriptors both on qemu and on real hardware, as long as all the drivers are present.

We could also follow up with a patch to remove the existing machine descriptors for the ARMv7M platforms, the only callback pointer the four platforms contain today is the armv7m_restart handler and we can simply make that the default for v7M with an add-on patch.

arch/arm/Kconfig +1 -1
index 72c1df0..a0fda44 100644
@@ -313,7 +313,7 @@ config MMU
 #
 choice
 	prompt "ARM system type"
-	default ARCH_VERSATILE if !MMU
+	default ARM_SINGLE_ARMV7M if !MMU
 	default ARCH_MULTIPLATFORM if MMU
 
 config ARCH_MULTIPLATFORM
arch/arm/kernel/devtree.c +1 -1
index 65addcb..2e26016 100644
@@ -211,7 +211,7 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
 {
 	const struct machine_desc *mdesc, *mdesc_best = NULL;
 
-#ifdef CONFIG_ARCH_MULTIPLATFORM
+#if defined(CONFIG_ARCH_MULTIPLATFORM) || defined(CONFIG_ARM_SINGLE_ARMV7M)
 	DT_MACHINE_START(GENERIC_DT, "Generic DT based system")
 	MACHINE_END
 
Quoted 2 lines

It looks like versatile_defconfig is also broken, but perhaps due to debug_ll changes?

Yes, a glitch in my test infrastructure caused me not to notice this earlier. I've added a fix for that as well, see my reply to Russell "Re: [PATCH 00/10]
ARM: debug-ll fixes".

Arnd