2022-04-06 00:59:33

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 00/12] ARM: ARMv5 multiplatform conversions

From: Arnd Bergmann <[email protected]>

I revisited some patches from a few years back, to see what
is needed forsome of the remaining platforms to become part of
CONFIG_ARCH_MULTIPLATFORM.

A few things happened since I last looked at this, which helps to make
this easier:

- The ixp4xx platform saw a large scale cleanup

- The ep93xx platform lost support for MaverickCrunch FPUs and
gained support for the common clock subsystem

- The OMAP1 platform has a proposed patch for the common
clock subsystem.

- The generic IRQ entry code is now used everywhere, including
on IOP32x.

- The s3c24xx platform is scheduled for removal next year

It appears that we can now convert almost all the remaining platforms
(ep93xx, dove, s3c24xx, iop32x and ixp4xx), leaving only:

- OMAP1 has a separate series, since the conversion is non- trivial,
and depends on the clk conversion from Janusz Krzysztofik. I'll
post that separately.

- PXA needs an even longer series, which I've also sent in the past,
but I'll keep that for later.

- The three StrongARM based platforms remain quite different from
the rest, and I expect that to stay this way, until they are
eventually removed from the tree.

For simplicity I'd want to merge the series directly through the
soc tree, provided there are no regressions or other concerns
with the patches.

Arnd

Arnd Bergmann (12):
ARM: versatile: move integrator/realview/vexpress to versatile
ARM: ep93xx: renumber interrupts
ARM: ep93xx: enable SPARSE_IRQ
ARM: ep93xx: make mach/ep93xx-regs.h local
ARM: ep93xx: multiplatform support
ARM: dove: multiplatform support
ARM: s3c24xx: remove support for ISA drivers on BAST PC/104
ARM: s3c24xx: convert to sparse-irq
ARM: s3c: enable s3c24xx multiplatform support
ARM: iop32x: enable multiplatform support
ARM: rework endianess selection
ARM: ixp4xx: enable multiplatform support

MAINTAINERS | 3 -
arch/arm/Kconfig | 87 +----
arch/arm/Makefile | 7 +-
.../compressed/misc-ep93xx.h} | 70 ++--
arch/arm/boot/compressed/misc.c | 4 +
arch/arm/configs/dove_defconfig | 2 +
arch/arm/configs/ep93xx_defconfig | 2 +
arch/arm/mach-asm9260/Kconfig | 1 +
arch/arm/mach-aspeed/Kconfig | 2 +-
arch/arm/mach-at91/Kconfig | 3 +-
arch/arm/mach-clps711x/Kconfig | 1 +
arch/arm/mach-davinci/Kconfig | 1 +
arch/arm/mach-dove/Kconfig | 16 +-
arch/arm/mach-dove/Makefile | 2 +
arch/arm/mach-dove/include/mach/uncompress.h | 34 --
arch/arm/mach-ep93xx/Kconfig | 13 +
arch/arm/mach-ep93xx/adssphere.c | 1 +
arch/arm/mach-ep93xx/core.c | 5 +-
arch/arm/mach-ep93xx/edb93xx.c | 8 +
.../{include/mach => }/ep93xx-regs.h | 4 -
arch/arm/mach-ep93xx/gesbc9312.c | 1 +
arch/arm/mach-ep93xx/gpio-ep93xx.h | 2 +-
arch/arm/mach-ep93xx/include/mach/irqs.h | 79 -----
arch/arm/mach-ep93xx/irqs.h | 76 +++++
arch/arm/mach-ep93xx/micro9.c | 4 +
arch/arm/mach-ep93xx/simone.c | 1 +
arch/arm/mach-ep93xx/snappercl15.c | 1 +
arch/arm/mach-ep93xx/soc.h | 3 +-
arch/arm/mach-ep93xx/ts72xx.c | 3 +-
arch/arm/mach-ep93xx/vision_ep9307.c | 1 +
arch/arm/mach-exynos/Kconfig | 1 -
arch/arm/mach-gemini/Kconfig | 1 +
arch/arm/mach-highbank/Kconfig | 1 -
arch/arm/mach-hisi/Kconfig | 2 +-
arch/arm/mach-imx/Kconfig | 4 +-
arch/arm/mach-integrator/Kconfig | 125 -------
arch/arm/mach-integrator/Makefile | 10 -
arch/arm/mach-iop32x/Kconfig | 18 +-
arch/arm/mach-iop32x/em7210.c | 1 +
arch/arm/mach-iop32x/glantank.c | 1 +
arch/arm/mach-iop32x/include/mach/irqs.h | 14 -
.../arm/mach-iop32x/include/mach/uncompress.h | 25 --
arch/arm/mach-iop32x/iq31244.c | 1 +
arch/arm/mach-iop32x/iq80321.c | 1 +
arch/arm/mach-iop32x/irqs.h | 2 +
arch/arm/mach-iop32x/n2100.c | 1 +
arch/arm/mach-ixp4xx/Kconfig | 22 +-
arch/arm/mach-ixp4xx/Makefile.boot | 4 -
.../arm/mach-ixp4xx/include/mach/uncompress.h | 54 ---
arch/arm/mach-keystone/Kconfig | 1 -
arch/arm/mach-lpc32xx/Kconfig | 1 +
arch/arm/mach-mmp/Kconfig | 2 +-
arch/arm/mach-moxart/Kconfig | 1 +
arch/arm/mach-mv78xx0/Kconfig | 1 +
arch/arm/mach-mvebu/Kconfig | 3 +-
arch/arm/mach-mxs/Kconfig | 1 +
arch/arm/mach-nomadik/Kconfig | 1 +
arch/arm/mach-npcm/Kconfig | 2 +-
arch/arm/mach-nspire/Kconfig | 1 +
arch/arm/mach-orion5x/Kconfig | 1 +
arch/arm/mach-oxnas/Kconfig | 2 +-
arch/arm/mach-qcom/Kconfig | 1 -
arch/arm/mach-realview/Kconfig | 103 ------
arch/arm/mach-realview/Makefile | 8 -
arch/arm/mach-s3c/Kconfig.s3c24xx | 25 +-
arch/arm/mach-s3c/bast-ide.c | 2 +-
arch/arm/mach-s3c/bast-irq.c | 2 +-
arch/arm/mach-s3c/cpu.c | 2 +-
arch/arm/mach-s3c/dev-audio-s3c64xx.c | 2 +-
arch/arm/mach-s3c/dev-uart-s3c64xx.c | 2 +-
arch/arm/mach-s3c/devs.c | 2 +-
arch/arm/mach-s3c/gpio-samsung.c | 2 +-
arch/arm/mach-s3c/include/mach/io-s3c24xx.h | 50 ---
arch/arm/mach-s3c/include/mach/io.h | 8 -
arch/arm/mach-s3c/irq-pm-s3c24xx.c | 2 +-
arch/arm/mach-s3c/irq-s3c24xx.c | 2 +-
.../{include/mach => }/irqs-s3c24xx.h | 18 +-
.../{include/mach => }/irqs-s3c64xx.h | 0
arch/arm/mach-s3c/{include/mach => }/irqs.h | 0
arch/arm/mach-s3c/mach-amlm5900.c | 2 +
arch/arm/mach-s3c/mach-anubis.c | 6 +-
arch/arm/mach-s3c/mach-anw6410.c | 2 +-
arch/arm/mach-s3c/mach-at2440evb.c | 1 +
arch/arm/mach-s3c/mach-bast.c | 6 +-
arch/arm/mach-s3c/mach-crag6410-module.c | 2 +-
arch/arm/mach-s3c/mach-crag6410.c | 2 +-
arch/arm/mach-s3c/mach-gta02.c | 1 +
arch/arm/mach-s3c/mach-h1940.c | 1 +
arch/arm/mach-s3c/mach-hmt.c | 2 +-
arch/arm/mach-s3c/mach-jive.c | 2 +-
arch/arm/mach-s3c/mach-mini2440.c | 3 +-
arch/arm/mach-s3c/mach-mini6410.c | 2 +-
arch/arm/mach-s3c/mach-n30.c | 2 +
arch/arm/mach-s3c/mach-ncp.c | 2 +-
arch/arm/mach-s3c/mach-nexcoder.c | 1 +
arch/arm/mach-s3c/mach-osiris.c | 6 +-
arch/arm/mach-s3c/mach-otom.c | 1 +
arch/arm/mach-s3c/mach-qt2410.c | 1 +
arch/arm/mach-s3c/mach-real6410.c | 2 +-
arch/arm/mach-s3c/mach-rx1950.c | 1 +
arch/arm/mach-s3c/mach-rx3715.c | 7 +-
arch/arm/mach-s3c/mach-smartq5.c | 2 +-
arch/arm/mach-s3c/mach-smartq7.c | 2 +-
arch/arm/mach-s3c/mach-smdk2410.c | 1 +
arch/arm/mach-s3c/mach-smdk2413.c | 3 +
arch/arm/mach-s3c/mach-smdk2416.c | 11 +-
arch/arm/mach-s3c/mach-smdk2440.c | 11 +-
arch/arm/mach-s3c/mach-smdk2443.c | 12 +-
arch/arm/mach-s3c/mach-smdk6400.c | 2 +-
arch/arm/mach-s3c/mach-smdk6410.c | 2 +-
arch/arm/mach-s3c/mach-tct_hammer.c | 1 +
arch/arm/mach-s3c/mach-vr1000.c | 6 +-
arch/arm/mach-s3c/mach-vstms.c | 1 +
.../mach-s3c/{include/mach => }/map-base.h | 6 +
arch/arm/mach-s3c/map-s3c24xx.h | 2 +-
arch/arm/mach-s3c/map-s3c64xx.h | 2 +-
arch/arm/mach-s3c/pl080.c | 2 +-
arch/arm/mach-s3c/pm-core-s3c24xx.h | 2 +-
arch/arm/mach-s3c/pm-s3c2412.c | 2 +-
arch/arm/mach-s3c/pm-s3c64xx.c | 2 +-
arch/arm/mach-s3c/pm.c | 2 +-
arch/arm/mach-s3c/s3c2443.c | 2 +-
arch/arm/mach-s3c/s3c24xx.h | 2 +-
arch/arm/mach-s3c/s3c64xx.c | 2 +-
arch/arm/mach-s3c/simtec-usb.c | 2 +-
arch/arm/mach-socfpga/Kconfig | 1 -
arch/arm/mach-spear/Kconfig | 2 +-
arch/arm/mach-sunxi/Kconfig | 3 +-
arch/arm/mach-versatile/Kconfig | 309 ++++++++++++++++++
arch/arm/mach-versatile/Makefile | 32 +-
.../Makefile.boot | 0
.../{mach-vexpress => mach-versatile}/dcscb.c | 4 +-
.../dcscb_setup.S | 2 -
.../headsmp.S | 2 -
.../hotplug.c | 2 +-
.../cm.h => mach-versatile/integrator-cm.h} | 0
.../integrator-hardware.h} | 0
.../core.c => mach-versatile/integrator.c} | 8 +-
.../common.h => mach-versatile/integrator.h} | 0
.../integrator_ap.c | 8 +-
.../integrator_cp.c | 8 +-
.../platsmp-realview.c} | 2 +-
.../platsmp-vexpress.c} | 7 +-
.../platsmp.c | 4 +-
.../include/plat => mach-versatile}/platsmp.h | 2 -
.../realview.c} | 0
.../{mach-vexpress => mach-versatile}/spc.c | 0
.../{mach-vexpress => mach-versatile}/spc.h | 0
.../tc2_pm.c | 2 -
.../v2m-mps2.c | 0
.../{mach-vexpress => mach-versatile}/v2m.c | 2 +-
.../{versatile_dt.c => versatile.c} | 0
.../core.h => mach-versatile/vexpress.h} | 0
arch/arm/mach-vexpress/Kconfig | 81 -----
arch/arm/mach-vexpress/Makefile | 19 --
arch/arm/mach-vt8500/Kconfig | 1 +
arch/arm/mach-zynq/Kconfig | 1 -
arch/arm/mm/Kconfig | 28 +-
arch/arm/plat-versatile/Makefile | 5 -
159 files changed, 708 insertions(+), 937 deletions(-)
rename arch/arm/{mach-ep93xx/include/mach/uncompress.h => boot/compressed/misc-ep93xx.h} (51%)
delete mode 100644 arch/arm/mach-dove/include/mach/uncompress.h
rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)
delete mode 100644 arch/arm/mach-ep93xx/include/mach/irqs.h
create mode 100644 arch/arm/mach-ep93xx/irqs.h
delete mode 100644 arch/arm/mach-integrator/Kconfig
delete mode 100644 arch/arm/mach-integrator/Makefile
delete mode 100644 arch/arm/mach-iop32x/include/mach/irqs.h
delete mode 100644 arch/arm/mach-iop32x/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-ixp4xx/Makefile.boot
delete mode 100644 arch/arm/mach-ixp4xx/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-realview/Kconfig
delete mode 100644 arch/arm/mach-realview/Makefile
delete mode 100644 arch/arm/mach-s3c/include/mach/io-s3c24xx.h
delete mode 100644 arch/arm/mach-s3c/include/mach/io.h
rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c24xx.h (95%)
rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c64xx.h (100%)
rename arch/arm/mach-s3c/{include/mach => }/irqs.h (100%)
rename arch/arm/mach-s3c/{include/mach => }/map-base.h (87%)
rename arch/arm/{mach-vexpress => mach-versatile}/Makefile.boot (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/dcscb.c (97%)
rename arch/arm/{mach-vexpress => mach-versatile}/dcscb_setup.S (95%)
rename arch/arm/{plat-versatile => mach-versatile}/headsmp.S (94%)
rename arch/arm/{plat-versatile => mach-versatile}/hotplug.c (98%)
rename arch/arm/{mach-integrator/cm.h => mach-versatile/integrator-cm.h} (100%)
rename arch/arm/{mach-integrator/hardware.h => mach-versatile/integrator-hardware.h} (100%)
rename arch/arm/{mach-integrator/core.c => mach-versatile/integrator.c} (95%)
rename arch/arm/{mach-integrator/common.h => mach-versatile/integrator.h} (100%)
rename arch/arm/{mach-integrator => mach-versatile}/integrator_ap.c (97%)
rename arch/arm/{mach-integrator => mach-versatile}/integrator_cp.c (96%)
rename arch/arm/{mach-realview/platsmp-dt.c => mach-versatile/platsmp-realview.c} (98%)
rename arch/arm/{mach-vexpress/platsmp.c => mach-versatile/platsmp-vexpress.c} (96%)
rename arch/arm/{plat-versatile => mach-versatile}/platsmp.c (97%)
rename arch/arm/{plat-versatile/include/plat => mach-versatile}/platsmp.h (87%)
rename arch/arm/{mach-realview/realview-dt.c => mach-versatile/realview.c} (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/spc.c (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/spc.h (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/tc2_pm.c (99%)
rename arch/arm/{mach-vexpress => mach-versatile}/v2m-mps2.c (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/v2m.c (97%)
rename arch/arm/mach-versatile/{versatile_dt.c => versatile.c} (100%)
rename arch/arm/{mach-vexpress/core.h => mach-versatile/vexpress.h} (100%)
delete mode 100644 arch/arm/mach-vexpress/Kconfig
delete mode 100644 arch/arm/mach-vexpress/Makefile
delete mode 100644 arch/arm/plat-versatile/Makefile

--
2.29.2
Cc: Russell King <[email protected]>
Cc: Hartley Sweeten <[email protected]>
Cc: Alexander Sverdlin <[email protected]>
Cc: Hubert Feurstein <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Alim Akhtar <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Imre Kaloz <[email protected]>
Cc: Krzysztof Halasa <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Gregory Clement <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Simtec Linux Team <[email protected]>
Cc: Liviu Dudau <[email protected]>
Cc: Sudeep Holla <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]


2022-04-06 01:13:39

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 06/12] ARM: dove: multiplatform support

From: Arnd Bergmann <[email protected]>

The dove platform is now ready to be enabled for multiplatform
support, this patch does the switch over by modifying the Kconfig file,
the defconfig and removing the last mach/*.h header that becomes obsolete
with this.

This work was originally done in 2015 as all the ARMv7 machiens
gove moved over to multiplatform builds, but at the time it conflicted
with some patches that Russell was trying to upstream, so we
left it at that.

I hope that there is no longer a need to keep dove separate from the
rest, so we can either add it to the other ARMv7 platforms, or just
replace it with the DT based platform code for the same hardware
in mach-mvebu and remove mach-dove entirely.

Acked-by: Andrew Lunn <[email protected]>
Cc: Russell King <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Gregory Clement <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/Kconfig | 14 --------
arch/arm/configs/dove_defconfig | 2 ++
arch/arm/mach-dove/Kconfig | 16 ++++++---
arch/arm/mach-dove/Makefile | 2 ++
arch/arm/mach-dove/include/mach/uncompress.h | 34 --------------------
5 files changed, 16 insertions(+), 52 deletions(-)
delete mode 100644 arch/arm/mach-dove/include/mach/uncompress.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2bd611beefe1..faf696173af7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -383,20 +383,6 @@ config ARCH_IXP4XX
help
Support for Intel's IXP4XX (XScale) family of processors.

-config ARCH_DOVE
- bool "Marvell Dove"
- select CPU_PJ4
- select GPIOLIB
- select HAVE_PCI
- select MVEBU_MBUS
- select PINCTRL
- select PINCTRL_DOVE
- select PLAT_ORION_LEGACY
- select SPARSE_IRQ
- select PM_GENERIC_DOMAINS if PM
- help
- Support for the Marvell Dove SoC 88AP510
-
config ARCH_PXA
bool "PXA2xx/PXA3xx-based"
select ARCH_MTD_XIP
diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig
index 33074fdab2ea..f8fb4758f80d 100644
--- a/arch/arm/configs/dove_defconfig
+++ b/arch/arm/configs/dove_defconfig
@@ -8,6 +8,8 @@ CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ARCH_MULTI_V6 is not set
+CONFIG_ARCH_MULTI_V7=y
CONFIG_ARCH_DOVE=y
CONFIG_MACH_DOVE_DB=y
CONFIG_MACH_CM_A510=y
diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig
index 7747fe64420a..c30c69c664ea 100644
--- a/arch/arm/mach-dove/Kconfig
+++ b/arch/arm/mach-dove/Kconfig
@@ -1,7 +1,17 @@
# SPDX-License-Identifier: GPL-2.0
-if ARCH_DOVE
+menuconfig ARCH_DOVE
+ bool "Marvell Dove" if ARCH_MULTI_V7
+ select CPU_PJ4
+ select GPIOLIB
+ select MVEBU_MBUS
+ select PINCTRL
+ select PINCTRL_DOVE
+ select PLAT_ORION_LEGACY
+ select PM_GENERIC_DOMAINS if PM
+ help
+ Support for the Marvell Dove SoC 88AP510

-menu "Marvell Dove Implementations"
+if ARCH_DOVE

config DOVE_LEGACY
bool
@@ -21,6 +31,4 @@ config MACH_CM_A510
Say 'Y' here if you want your kernel to support the
CompuLab CM-A510 Board.

-endmenu
-
endif
diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile
index cdf163cab738..e83f6492834d 100644
--- a/arch/arm/mach-dove/Makefile
+++ b/arch/arm/mach-dove/Makefile
@@ -1,4 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
+
obj-y += common.o
obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o
obj-$(CONFIG_PCI) += pcie.o
diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h
deleted file mode 100644
index ddf873f35e2b..000000000000
--- a/arch/arm/mach-dove/include/mach/uncompress.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#define UART0_PHYS_BASE (0xf1000000 + 0x12000)
-
-#define UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0))
-#define UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14))
-
-#define LSR_THRE 0x20
-
-static inline void putc(const char c)
-{
- int i;
-
- for (i = 0; i < 0x1000; i++) {
- /* Transmit fifo not full? */
- if (*UART_LSR & LSR_THRE)
- break;
- }
-
- *UART_THR = c;
-}
-
-static inline void flush(void)
-{
-}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
--
2.29.2

2022-04-06 01:42:55

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local

From: Arnd Bergmann <[email protected]>

Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move
it there.

Cc: Hartley Sweeten <[email protected]>
Tested-by: Alexander Sverdlin <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ----
arch/arm/mach-ep93xx/gpio-ep93xx.h | 2 +-
arch/arm/mach-ep93xx/include/mach/uncompress.h | 1 -
arch/arm/mach-ep93xx/soc.h | 2 +-
4 files changed, 2 insertions(+), 7 deletions(-)
rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)

diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/ep93xx-regs.h
similarity index 94%
rename from arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
rename to arch/arm/mach-ep93xx/ep93xx-regs.h
index 6839ea032e58..8fa3646de0a4 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/ep93xx-regs.h
@@ -1,8 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
- */
-
#ifndef __ASM_ARCH_EP93XX_REGS_H
#define __ASM_ARCH_EP93XX_REGS_H

diff --git a/arch/arm/mach-ep93xx/gpio-ep93xx.h b/arch/arm/mach-ep93xx/gpio-ep93xx.h
index 242af4a401ea..7b46eb7e5507 100644
--- a/arch/arm/mach-ep93xx/gpio-ep93xx.h
+++ b/arch/arm/mach-ep93xx/gpio-ep93xx.h
@@ -4,7 +4,7 @@
#ifndef __GPIO_EP93XX_H
#define __GPIO_EP93XX_H

-#include <mach/ep93xx-regs.h>
+#include "ep93xx-regs.h"

#define EP93XX_GPIO_PHYS_BASE EP93XX_APB_PHYS(0x00040000)
#define EP93XX_GPIO_BASE EP93XX_APB_IOMEM(0x00040000)
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
index b3ec1db988db..e20bcab702b2 100644
--- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -5,7 +5,6 @@
* Copyright (C) 2006 Lennert Buytenhek <[email protected]>
*/

-#include <mach/ep93xx-regs.h>
#include <asm/mach-types.h>

static unsigned char __raw_readb(unsigned int ptr)
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index f0986e288d19..3245ebbd5069 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -9,7 +9,7 @@
#ifndef _EP93XX_SOC_H
#define _EP93XX_SOC_H

-#include <mach/ep93xx-regs.h>
+#include "ep93xx-regs.h"
#include "irqs.h"

/*
--
2.29.2

2022-04-06 01:48:42

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 12/12] ARM: ixp4xx: enable multiplatform support

From: Arnd Bergmann <[email protected]>

After all the work that Linus Walleij did on this platform, it can be
part of a generic kernel build as well.

Note that there are known bugs in little-endian mode on ixp4xx, and
no other ARMv5 platform at this point supports big-endian mode, or is
likely to in the future, so there is limited practical value in this,
but it helps with build testing and ixp4xx little-endian support may
get fixed in the future.

Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/Kconfig | 16 ------
arch/arm/mach-ixp4xx/Kconfig | 22 +++++---
arch/arm/mach-ixp4xx/Makefile.boot | 4 --
.../arm/mach-ixp4xx/include/mach/uncompress.h | 54 -------------------
4 files changed, 15 insertions(+), 81 deletions(-)
delete mode 100644 arch/arm/mach-ixp4xx/Makefile.boot
delete mode 100644 arch/arm/mach-ixp4xx/include/mach/uncompress.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4d98de155e20..db9b9ed5d7c7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -357,22 +357,6 @@ config ARCH_FOOTBRIDGE
Support for systems based on the DC21285 companion chip
("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.

-config ARCH_IXP4XX
- bool "IXP4xx-based"
- depends on CPU_BIG_ENDIAN
- select ARM_PATCH_PHYS_VIRT
- select CPU_XSCALE
- select GPIO_IXP4XX
- select GPIOLIB
- select HAVE_PCI
- select IXP4XX_IRQ
- select IXP4XX_TIMER
- select SPARSE_IRQ
- select USB_EHCI_BIG_ENDIAN_DESC
- select USB_EHCI_BIG_ENDIAN_MMIO
- help
- Support for Intel's IXP4XX (XScale) family of processors.
-
config ARCH_PXA
bool "PXA2xx/PXA3xx-based"
depends on CPU_LITTLE_ENDIAN
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index f41ba3f42fc8..dc6ea3c2e3ed 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -1,9 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-only
-if ARCH_IXP4XX
-
-menu "Intel IXP4xx Implementation Options"
+menuconfig ARCH_IXP4XX
+ bool "IXP4xx-based platforms"
+ depends on ARCH_MULTI_V5
+ depends on CPU_BIG_ENDIAN
+ select CPU_XSCALE
+ select GPIO_IXP4XX
+ select GPIOLIB
+ select FORCE_PCI
+ select IXP4XX_IRQ
+ select IXP4XX_TIMER
+ select USB_EHCI_BIG_ENDIAN_DESC
+ select USB_EHCI_BIG_ENDIAN_MMIO
+ help
+ Support for Intel's IXP4XX (XScale) family of processors.

-comment "IXP4xx Platforms"
+if ARCH_IXP4XX

config MACH_IXP4XX_OF
bool
@@ -12,11 +23,8 @@ config MACH_IXP4XX_OF
select ARM_APPENDED_DTB # Old Redboot bootloaders deployed
select I2C
select I2C_IOP3XX
- select PCI
select USE_OF
help
Say 'Y' here to support Device Tree-based IXP4xx platforms.

-endmenu
-
endif
diff --git a/arch/arm/mach-ixp4xx/Makefile.boot b/arch/arm/mach-ixp4xx/Makefile.boot
deleted file mode 100644
index 9b015bd1ef27..000000000000
--- a/arch/arm/mach-ixp4xx/Makefile.boot
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
- zreladdr-y += 0x00008000
-params_phys-y := 0x00000100
-
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
deleted file mode 100644
index 09e7663e6a55..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * arch/arm/mach-ixp4xx/include/mach/uncompress.h
- *
- * Copyright (C) 2002 Intel Corporation.
- * Copyright (C) 2003-2004 MontaVista Software, Inc.
- */
-
-#ifndef _ARCH_UNCOMPRESS_H_
-#define _ARCH_UNCOMPRESS_H_
-
-#include <asm/mach-types.h>
-#include <linux/serial_reg.h>
-
-#define IXP4XX_UART1_BASE_PHYS 0xc8000000
-#define IXP4XX_UART2_BASE_PHYS 0xc8001000
-
-#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
-
-volatile u32* uart_base;
-
-static inline void putc(int c)
-{
- /* Check THRE and TEMT bits before we transmit the character.
- */
- while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
- barrier();
-
- *uart_base = c;
-}
-
-static void flush(void)
-{
-}
-
-static __inline__ void __arch_decomp_setup(unsigned long arch_id)
-{
- /*
- * Some boards are using UART2 as console
- */
- if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
- machine_is_gateway7001() || machine_is_wg302v2() ||
- machine_is_devixp() || machine_is_miccpt() || machine_is_mic256())
- uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
- else
- uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
-}
-
-/*
- * arch_id is a variable in decompress_kernel()
- */
-#define arch_decomp_setup() __arch_decomp_setup(arch_id)
-
-#endif
--
2.29.2

2022-04-06 01:53:56

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile

From: Arnd Bergmann <[email protected]>

These are all fairly small platforms by now, and they are
closely related. Just move them all into a single directory.

Cc: Linus Walleij <[email protected]>
Cc: Liviu Dudau <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Tested-by: Sudeep Holla <[email protected]>
Acked-by: Sudeep Holla <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
MAINTAINERS | 3 -
arch/arm/Kconfig | 6 -
arch/arm/Makefile | 7 +-
arch/arm/mach-integrator/Kconfig | 125 -------
arch/arm/mach-integrator/Makefile | 10 -
arch/arm/mach-realview/Kconfig | 103 ------
arch/arm/mach-realview/Makefile | 8 -
arch/arm/mach-versatile/Kconfig | 308 ++++++++++++++++++
arch/arm/mach-versatile/Makefile | 32 +-
.../Makefile.boot | 0
.../{mach-vexpress => mach-versatile}/dcscb.c | 4 +-
.../dcscb_setup.S | 2 -
.../headsmp.S | 2 -
.../hotplug.c | 2 +-
.../cm.h => mach-versatile/integrator-cm.h} | 0
.../integrator-hardware.h} | 0
.../core.c => mach-versatile/integrator.c} | 8 +-
.../common.h => mach-versatile/integrator.h} | 0
.../integrator_ap.c | 8 +-
.../integrator_cp.c | 8 +-
.../platsmp-realview.c} | 2 +-
.../platsmp-vexpress.c} | 7 +-
.../platsmp.c | 4 +-
.../include/plat => mach-versatile}/platsmp.h | 2 -
.../realview.c} | 0
.../{mach-vexpress => mach-versatile}/spc.c | 0
.../{mach-vexpress => mach-versatile}/spc.h | 0
.../tc2_pm.c | 2 -
.../v2m-mps2.c | 0
.../{mach-vexpress => mach-versatile}/v2m.c | 2 +-
.../{versatile_dt.c => versatile.c} | 0
.../core.h => mach-versatile/vexpress.h} | 0
arch/arm/mach-vexpress/Kconfig | 81 -----
arch/arm/mach-vexpress/Makefile | 19 --
arch/arm/plat-versatile/Makefile | 5 -
35 files changed, 357 insertions(+), 403 deletions(-)
delete mode 100644 arch/arm/mach-integrator/Kconfig
delete mode 100644 arch/arm/mach-integrator/Makefile
delete mode 100644 arch/arm/mach-realview/Kconfig
delete mode 100644 arch/arm/mach-realview/Makefile
rename arch/arm/{mach-vexpress => mach-versatile}/Makefile.boot (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/dcscb.c (97%)
rename arch/arm/{mach-vexpress => mach-versatile}/dcscb_setup.S (95%)
rename arch/arm/{plat-versatile => mach-versatile}/headsmp.S (94%)
rename arch/arm/{plat-versatile => mach-versatile}/hotplug.c (98%)
rename arch/arm/{mach-integrator/cm.h => mach-versatile/integrator-cm.h} (100%)
rename arch/arm/{mach-integrator/hardware.h => mach-versatile/integrator-hardware.h} (100%)
rename arch/arm/{mach-integrator/core.c => mach-versatile/integrator.c} (95%)
rename arch/arm/{mach-integrator/common.h => mach-versatile/integrator.h} (100%)
rename arch/arm/{mach-integrator => mach-versatile}/integrator_ap.c (97%)
rename arch/arm/{mach-integrator => mach-versatile}/integrator_cp.c (96%)
rename arch/arm/{mach-realview/platsmp-dt.c => mach-versatile/platsmp-realview.c} (98%)
rename arch/arm/{mach-vexpress/platsmp.c => mach-versatile/platsmp-vexpress.c} (96%)
rename arch/arm/{plat-versatile => mach-versatile}/platsmp.c (97%)
rename arch/arm/{plat-versatile/include/plat => mach-versatile}/platsmp.h (87%)
rename arch/arm/{mach-realview/realview-dt.c => mach-versatile/realview.c} (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/spc.c (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/spc.h (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/tc2_pm.c (99%)
rename arch/arm/{mach-vexpress => mach-versatile}/v2m-mps2.c (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/v2m.c (97%)
rename arch/arm/mach-versatile/{versatile_dt.c => versatile.c} (100%)
rename arch/arm/{mach-vexpress/core.h => mach-versatile/vexpress.h} (100%)
delete mode 100644 arch/arm/mach-vexpress/Kconfig
delete mode 100644 arch/arm/mach-vexpress/Makefile
delete mode 100644 arch/arm/plat-versatile/Makefile

diff --git a/MAINTAINERS b/MAINTAINERS
index fd768d43e048..6a0363b0f106 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1525,10 +1525,7 @@ F: Documentation/devicetree/bindings/mtd/mtd-physmap.yaml
F: arch/arm/boot/dts/arm-realview-*
F: arch/arm/boot/dts/integrator*
F: arch/arm/boot/dts/versatile*
-F: arch/arm/mach-integrator/
-F: arch/arm/mach-realview/
F: arch/arm/mach-versatile/
-F: arch/arm/plat-versatile/
F: drivers/bus/arm-integrator-lm.c
F: drivers/clk/versatile/
F: drivers/i2c/busses/i2c-versatile.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2e8091e2d8a8..31f024e6e925 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -622,8 +622,6 @@ source "arch/arm/mach-hisi/Kconfig"

source "arch/arm/mach-imx/Kconfig"

-source "arch/arm/mach-integrator/Kconfig"
-
source "arch/arm/mach-iop32x/Kconfig"

source "arch/arm/mach-ixp4xx/Kconfig"
@@ -675,8 +673,6 @@ source "arch/arm/mach-rda/Kconfig"

source "arch/arm/mach-realtek/Kconfig"

-source "arch/arm/mach-realview/Kconfig"
-
source "arch/arm/mach-rockchip/Kconfig"

source "arch/arm/mach-s3c/Kconfig"
@@ -705,8 +701,6 @@ source "arch/arm/mach-ux500/Kconfig"

source "arch/arm/mach-versatile/Kconfig"

-source "arch/arm/mach-vexpress/Kconfig"
-
source "arch/arm/mach-vt8500/Kconfig"

source "arch/arm/mach-zynq/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index a2391b8de5a5..8740e3a63afb 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -179,7 +179,6 @@ machine-$(CONFIG_ARCH_FOOTBRIDGE) += footbridge
machine-$(CONFIG_ARCH_GEMINI) += gemini
machine-$(CONFIG_ARCH_HIGHBANK) += highbank
machine-$(CONFIG_ARCH_HISI) += hisi
-machine-$(CONFIG_ARCH_INTEGRATOR) += integrator
machine-$(CONFIG_ARCH_IOP32X) += iop32x
machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx
machine-$(CONFIG_ARCH_KEYSTONE) += keystone
@@ -187,7 +186,6 @@ machine-$(CONFIG_ARCH_LPC18XX) += lpc18xx
machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
machine-$(CONFIG_ARCH_MESON) += meson
machine-$(CONFIG_ARCH_MMP) += mmp
-machine-$(CONFIG_ARCH_MPS2) += vexpress
machine-$(CONFIG_ARCH_MOXART) += moxart
machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0
machine-$(CONFIG_ARCH_MVEBU) += mvebu
@@ -207,7 +205,6 @@ machine-$(CONFIG_ARCH_PXA) += pxa
machine-$(CONFIG_ARCH_QCOM) += qcom
machine-$(CONFIG_ARCH_RDA) += rda
machine-$(CONFIG_ARCH_REALTEK) += realtek
-machine-$(CONFIG_ARCH_REALVIEW) += realview
machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
machine-$(CONFIG_ARCH_RPC) += rpc
machine-$(CONFIG_PLAT_SAMSUNG) += s3c
@@ -220,10 +217,9 @@ machine-$(CONFIG_ARCH_STM32) += stm32
machine-$(CONFIG_ARCH_SUNXI) += sunxi
machine-$(CONFIG_ARCH_TEGRA) += tegra
machine-$(CONFIG_ARCH_U8500) += ux500
-machine-$(CONFIG_ARCH_VERSATILE) += versatile
-machine-$(CONFIG_ARCH_VEXPRESS) += vexpress
machine-$(CONFIG_ARCH_VT8500) += vt8500
machine-$(CONFIG_ARCH_ZYNQ) += zynq
+machine-$(CONFIG_PLAT_VERSATILE) += versatile
machine-$(CONFIG_PLAT_SPEAR) += spear

# Platform directory name. This list is sorted alphanumerically
@@ -231,7 +227,6 @@ machine-$(CONFIG_PLAT_SPEAR) += spear
plat-$(CONFIG_ARCH_OMAP) += omap
plat-$(CONFIG_PLAT_ORION) += orion
plat-$(CONFIG_PLAT_PXA) += pxa
-plat-$(CONFIG_PLAT_VERSATILE) += versatile

# The byte offset of the kernel image in RAM from the start of RAM.
TEXT_OFFSET := $(textofs-y)
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig
deleted file mode 100644
index d61ea616cf8e..000000000000
--- a/arch/arm/mach-integrator/Kconfig
+++ /dev/null
@@ -1,125 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menuconfig ARCH_INTEGRATOR
- bool "ARM Ltd. Integrator family"
- depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6
- select ARM_AMBA
- select CMA
- select DMA_CMA
- select HAVE_TCM
- select CLK_ICST
- select MFD_SYSCON
- select PLAT_VERSATILE
- select POWER_RESET
- select POWER_RESET_VERSATILE
- select POWER_SUPPLY
- select SOC_INTEGRATOR_CM
- select VERSATILE_FPGA_IRQ
- help
- Support for ARM's Integrator platform.
-
-if ARCH_INTEGRATOR
-
-config ARCH_INTEGRATOR_AP
- bool "Support Integrator/AP and Integrator/PP2 platforms"
- select INTEGRATOR_AP_TIMER
- select SERIAL_AMBA_PL010 if TTY
- select SERIAL_AMBA_PL010_CONSOLE if TTY
- select SOC_BUS
- help
- Include support for the ARM(R) Integrator/AP and
- Integrator/PP2 platforms.
-
-config INTEGRATOR_IMPD1
- bool "Include support for Integrator/IM-PD1"
- depends on ARCH_INTEGRATOR_AP
- select ARM_VIC
- select GPIO_PL061
- select GPIOLIB
- select REGULATOR
- select REGULATOR_FIXED_VOLTAGE
- help
- The IM-PD1 is an add-on logic module for the Integrator which
- allows ARM(R) Ltd PrimeCells to be developed and evaluated.
- The IM-PD1 can be found on the Integrator/PP2 platform.
-
-config INTEGRATOR_CM720T
- bool "Integrator/CM720T core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V4T
- select CPU_ARM720T
-
-config INTEGRATOR_CM920T
- bool "Integrator/CM920T core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V4T
- select CPU_ARM920T
-
-config INTEGRATOR_CM922T_XA10
- bool "Integrator/CM922T-XA10 core module"
- depends on ARCH_MULTI_V4T
- depends on ARCH_INTEGRATOR_AP
- select CPU_ARM922T
-
-config INTEGRATOR_CM926EJS
- bool "Integrator/CM926EJ-S core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V5
- select CPU_ARM926T
-
-config INTEGRATOR_CM10200E_REV0
- bool "Integrator/CM10200E rev.0 core module"
- depends on ARCH_INTEGRATOR_AP && n
- depends on ARCH_MULTI_V5
- select CPU_ARM1020
-
-config INTEGRATOR_CM10200E
- bool "Integrator/CM10200E core module"
- depends on ARCH_INTEGRATOR_AP && n
- depends on ARCH_MULTI_V5
- select CPU_ARM1020E
-
-config INTEGRATOR_CM10220E
- bool "Integrator/CM10220E core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V5
- select CPU_ARM1022
-
-config INTEGRATOR_CM1026EJS
- bool "Integrator/CM1026EJ-S core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V5
- select CPU_ARM1026
-
-config INTEGRATOR_CM1136JFS
- bool "Integrator/CM1136JF-S core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V6
- select CPU_V6
-
-config ARCH_INTEGRATOR_CP
- bool "Support Integrator/CP platform"
- depends on ARCH_MULTI_V5 || ARCH_MULTI_V6
- select ARM_TIMER_SP804
- select SERIAL_AMBA_PL011 if TTY
- select SERIAL_AMBA_PL011_CONSOLE if TTY
- select SOC_BUS
- help
- Include support for the ARM(R) Integrator CP platform.
-
-config INTEGRATOR_CT926
- bool "Integrator/CT926 (ARM926EJ-S) core tile"
- depends on ARCH_INTEGRATOR_CP
- depends on ARCH_MULTI_V5
- select CPU_ARM926T
-
-config INTEGRATOR_CTB36
- bool "Integrator/CTB36 (ARM1136JF-S) core tile"
- depends on ARCH_INTEGRATOR_CP
- depends on ARCH_MULTI_V6
- select CPU_V6
-
-config ARCH_CINTEGRATOR
- depends on ARCH_INTEGRATOR_CP
- def_bool y
-
-endif
diff --git a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile
deleted file mode 100644
index 7857a55c90b0..000000000000
--- a/arch/arm/mach-integrator/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y := core.o
-obj-$(CONFIG_ARCH_INTEGRATOR_AP) += integrator_ap.o
-obj-$(CONFIG_ARCH_INTEGRATOR_CP) += integrator_cp.o
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
deleted file mode 100644
index a4c36024b5e8..000000000000
--- a/arch/arm/mach-realview/Kconfig
+++ /dev/null
@@ -1,103 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menuconfig ARCH_REALVIEW
- bool "ARM Ltd. RealView family"
- depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
- select ARM_AMBA
- select ARM_GIC
- select ARM_TIMER_SP804
- select CLK_SP810
- select GPIO_PL061 if GPIOLIB
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_PATA_PLATFORM
- select HAVE_TCM
- select CLK_ICST
- select MACH_REALVIEW_EB if ARCH_MULTI_V5
- select MFD_SYSCON
- select PLAT_VERSATILE
- select POWER_RESET
- select POWER_RESET_VERSATILE
- select POWER_SUPPLY
- select SOC_REALVIEW
- help
- This enables support for ARM Ltd RealView boards.
-
-if ARCH_REALVIEW
-
-config MACH_REALVIEW_EB
- bool "Support RealView(R) Emulation Baseboard"
- select ARM_GIC
- select CPU_ARM926T if ARCH_MULTI_V5
- help
- Include support for the ARM(R) RealView(R) Emulation Baseboard
- platform. On an ARMv5 kernel, this will include support for
- the ARM926EJ-S core tile, while on an ARMv6/v7 kernel, at least
- one of the ARM1136, ARM1176, ARM11MPCore or Cortex-A9MPCore
- core tile options should be enabled.
-
-config REALVIEW_EB_ARM1136
- bool "Support ARM1136J(F)-S Tile"
- depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
- select CPU_V6
- help
- Enable support for the ARM1136 tile fitted to the
- Realview(R) Emulation Baseboard platform.
-
-config REALVIEW_EB_ARM1176
- bool "Support ARM1176JZ(F)-S Tile"
- depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
- help
- Enable support for the ARM1176 tile fitted to the
- Realview(R) Emulation Baseboard platform.
-
-config REALVIEW_EB_A9MP
- bool "Support Multicore Cortex-A9 Tile"
- depends on MACH_REALVIEW_EB && ARCH_MULTI_V7
- help
- Enable support for the Cortex-A9MPCore tile fitted to the
- Realview(R) Emulation Baseboard platform.
-
-config REALVIEW_EB_ARM11MP
- bool "Support ARM11MPCore Tile"
- depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
- select HAVE_SMP
- help
- Enable support for the ARM11MPCore tile fitted to the Realview(R)
- Emulation Baseboard platform.
-
-config MACH_REALVIEW_PB11MP
- bool "Support RealView(R) Platform Baseboard for ARM11MPCore"
- depends on ARCH_MULTI_V6
- select HAVE_SMP
- help
- Include support for the ARM(R) RealView(R) Platform Baseboard for
- the ARM11MPCore. This platform has an on-board ARM11MPCore and has
- support for PCI-E and Compact Flash.
-
-# ARMv6 CPU without K extensions, but does have the new exclusive ops
-config MACH_REALVIEW_PB1176
- bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S"
- depends on ARCH_MULTI_V6
- select CPU_V6
- select HAVE_TCM
- help
- Include support for the ARM(R) RealView(R) Platform Baseboard for
- ARM1176JZF-S.
-
-config MACH_REALVIEW_PBA8
- bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform"
- depends on ARCH_MULTI_V7
- help
- Include support for the ARM(R) RealView Platform Baseboard for
- Cortex(tm)-A8. This platform has an on-board Cortex-A8 and has
- support for PCI-E and Compact Flash.
-
-config MACH_REALVIEW_PBX
- bool "Support RealView(R) Platform Baseboard Explore for Cortex-A9"
- depends on ARCH_MULTI_V7
- select ZONE_DMA
- help
- Include support for the ARM(R) RealView(R) Platform Baseboard
- Explore.
-
-endif
diff --git a/arch/arm/mach-realview/Makefile b/arch/arm/mach-realview/Makefile
deleted file mode 100644
index e259091591b8..000000000000
--- a/arch/arm/mach-realview/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for the linux kernel.
-#
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-versatile/include
-
-obj-y += realview-dt.o
-obj-$(CONFIG_SMP) += platsmp-dt.o
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index f78a1d358031..94b492c12e8d 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -16,3 +16,311 @@ config ARCH_VERSATILE
help
This enables support for ARM Ltd Versatile board.

+menuconfig ARCH_INTEGRATOR
+ bool "ARM Ltd. Integrator family"
+ depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6
+ select ARM_AMBA
+ select CMA
+ select DMA_CMA
+ select HAVE_TCM
+ select CLK_ICST
+ select MFD_SYSCON
+ select PLAT_VERSATILE
+ select POWER_RESET
+ select POWER_RESET_VERSATILE
+ select POWER_SUPPLY
+ select SOC_INTEGRATOR_CM
+ select VERSATILE_FPGA_IRQ
+ help
+ Support for ARM's Integrator platform.
+
+if ARCH_INTEGRATOR
+
+config ARCH_INTEGRATOR_AP
+ bool "Support Integrator/AP and Integrator/PP2 platforms"
+ select INTEGRATOR_AP_TIMER
+ select SERIAL_AMBA_PL010 if TTY
+ select SERIAL_AMBA_PL010_CONSOLE if TTY
+ select SOC_BUS
+ help
+ Include support for the ARM(R) Integrator/AP and
+ Integrator/PP2 platforms.
+
+config INTEGRATOR_IMPD1
+ bool "Include support for Integrator/IM-PD1"
+ depends on ARCH_INTEGRATOR_AP
+ select ARM_VIC
+ select GPIO_PL061
+ select GPIOLIB
+ select REGULATOR
+ select REGULATOR_FIXED_VOLTAGE
+ help
+ The IM-PD1 is an add-on logic module for the Integrator which
+ allows ARM(R) Ltd PrimeCells to be developed and evaluated.
+ The IM-PD1 can be found on the Integrator/PP2 platform.
+
+config INTEGRATOR_CM720T
+ bool "Integrator/CM720T core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V4T
+ select CPU_ARM720T
+
+config INTEGRATOR_CM920T
+ bool "Integrator/CM920T core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V4T
+ select CPU_ARM920T
+
+config INTEGRATOR_CM922T_XA10
+ bool "Integrator/CM922T-XA10 core module"
+ depends on ARCH_MULTI_V4T
+ depends on ARCH_INTEGRATOR_AP
+ select CPU_ARM922T
+
+config INTEGRATOR_CM926EJS
+ bool "Integrator/CM926EJ-S core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V5
+ select CPU_ARM926T
+
+config INTEGRATOR_CM10200E_REV0
+ bool "Integrator/CM10200E rev.0 core module"
+ depends on ARCH_INTEGRATOR_AP && n
+ depends on ARCH_MULTI_V5
+ select CPU_ARM1020
+
+config INTEGRATOR_CM10200E
+ bool "Integrator/CM10200E core module"
+ depends on ARCH_INTEGRATOR_AP && n
+ depends on ARCH_MULTI_V5
+ select CPU_ARM1020E
+
+config INTEGRATOR_CM10220E
+ bool "Integrator/CM10220E core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V5
+ select CPU_ARM1022
+
+config INTEGRATOR_CM1026EJS
+ bool "Integrator/CM1026EJ-S core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V5
+ select CPU_ARM1026
+
+config INTEGRATOR_CM1136JFS
+ bool "Integrator/CM1136JF-S core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V6
+ select CPU_V6
+
+config ARCH_INTEGRATOR_CP
+ bool "Support Integrator/CP platform"
+ depends on ARCH_MULTI_V5 || ARCH_MULTI_V6
+ select ARM_TIMER_SP804
+ select SERIAL_AMBA_PL011 if TTY
+ select SERIAL_AMBA_PL011_CONSOLE if TTY
+ select SOC_BUS
+ help
+ Include support for the ARM(R) Integrator CP platform.
+
+config INTEGRATOR_CT926
+ bool "Integrator/CT926 (ARM926EJ-S) core tile"
+ depends on ARCH_INTEGRATOR_CP
+ depends on ARCH_MULTI_V5
+ select CPU_ARM926T
+
+config INTEGRATOR_CTB36
+ bool "Integrator/CTB36 (ARM1136JF-S) core tile"
+ depends on ARCH_INTEGRATOR_CP
+ depends on ARCH_MULTI_V6
+ select CPU_V6
+
+config ARCH_CINTEGRATOR
+ depends on ARCH_INTEGRATOR_CP
+ def_bool y
+
+endif
+
+menuconfig ARCH_REALVIEW
+ bool "ARM Ltd. RealView family"
+ depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
+ select ARM_AMBA
+ select ARM_GIC
+ select ARM_TIMER_SP804
+ select CLK_SP810
+ select GPIO_PL061 if GPIOLIB
+ select HAVE_ARM_SCU if SMP
+ select HAVE_ARM_TWD if SMP
+ select HAVE_PATA_PLATFORM
+ select HAVE_TCM
+ select CLK_ICST
+ select MACH_REALVIEW_EB if ARCH_MULTI_V5
+ select MFD_SYSCON
+ select PLAT_VERSATILE
+ select POWER_RESET
+ select POWER_RESET_VERSATILE
+ select POWER_SUPPLY
+ select SOC_REALVIEW
+ help
+ This enables support for ARM Ltd RealView boards.
+
+if ARCH_REALVIEW
+
+config MACH_REALVIEW_EB
+ bool "Support RealView(R) Emulation Baseboard"
+ select ARM_GIC
+ select CPU_ARM926T if ARCH_MULTI_V5
+ help
+ Include support for the ARM(R) RealView(R) Emulation Baseboard
+ platform. On an ARMv5 kernel, this will include support for
+ the ARM926EJ-S core tile, while on an ARMv6/v7 kernel, at least
+ one of the ARM1136, ARM1176, ARM11MPCore or Cortex-A9MPCore
+ core tile options should be enabled.
+
+config REALVIEW_EB_ARM1136
+ bool "Support ARM1136J(F)-S Tile"
+ depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
+ select CPU_V6
+ help
+ Enable support for the ARM1136 tile fitted to the
+ Realview(R) Emulation Baseboard platform.
+
+config REALVIEW_EB_ARM1176
+ bool "Support ARM1176JZ(F)-S Tile"
+ depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
+ help
+ Enable support for the ARM1176 tile fitted to the
+ Realview(R) Emulation Baseboard platform.
+
+config REALVIEW_EB_A9MP
+ bool "Support Multicore Cortex-A9 Tile"
+ depends on MACH_REALVIEW_EB && ARCH_MULTI_V7
+ help
+ Enable support for the Cortex-A9MPCore tile fitted to the
+ Realview(R) Emulation Baseboard platform.
+
+config REALVIEW_EB_ARM11MP
+ bool "Support ARM11MPCore Tile"
+ depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
+ select HAVE_SMP
+ help
+ Enable support for the ARM11MPCore tile fitted to the Realview(R)
+ Emulation Baseboard platform.
+
+config MACH_REALVIEW_PB11MP
+ bool "Support RealView(R) Platform Baseboard for ARM11MPCore"
+ depends on ARCH_MULTI_V6
+ select HAVE_SMP
+ help
+ Include support for the ARM(R) RealView(R) Platform Baseboard for
+ the ARM11MPCore. This platform has an on-board ARM11MPCore and has
+ support for PCI-E and Compact Flash.
+
+# ARMv6 CPU without K extensions, but does have the new exclusive ops
+config MACH_REALVIEW_PB1176
+ bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S"
+ depends on ARCH_MULTI_V6
+ select CPU_V6
+ select HAVE_TCM
+ help
+ Include support for the ARM(R) RealView(R) Platform Baseboard for
+ ARM1176JZF-S.
+
+config MACH_REALVIEW_PBA8
+ bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform"
+ depends on ARCH_MULTI_V7
+ help
+ Include support for the ARM(R) RealView Platform Baseboard for
+ Cortex(tm)-A8. This platform has an on-board Cortex-A8 and has
+ support for PCI-E and Compact Flash.
+
+config MACH_REALVIEW_PBX
+ bool "Support RealView(R) Platform Baseboard Explore for Cortex-A9"
+ depends on ARCH_MULTI_V7
+ select ZONE_DMA
+ help
+ Include support for the ARM(R) RealView(R) Platform Baseboard
+ Explore.
+
+endif
+
+menuconfig ARCH_VEXPRESS
+ bool "ARM Ltd. Versatile Express family"
+ depends on ARCH_MULTI_V7
+ select ARCH_SUPPORTS_BIG_ENDIAN
+ select ARM_AMBA
+ select ARM_GIC
+ select ARM_GLOBAL_TIMER
+ select ARM_TIMER_SP804
+ select GPIOLIB
+ select HAVE_ARM_SCU if SMP
+ select HAVE_ARM_TWD if SMP
+ select HAVE_PATA_PLATFORM
+ select CLK_ICST
+ select NO_IOPORT_MAP
+ select PLAT_VERSATILE
+ select POWER_RESET
+ select POWER_RESET_VEXPRESS
+ select POWER_SUPPLY
+ select REGULATOR if MMC_ARMMMCI
+ select REGULATOR_FIXED_VOLTAGE if REGULATOR
+ select VEXPRESS_CONFIG
+ help
+ This option enables support for systems using Cortex processor based
+ ARM core and logic (FPGA) tiles on the Versatile Express motherboard,
+ for example:
+
+ - CoreTile Express A5x2 (V2P-CA5s)
+ - CoreTile Express A9x4 (V2P-CA9)
+ - CoreTile Express A15x2 (V2P-CA15)
+ - LogicTile Express 13MG (V2F-2XV6) with A5, A7, A9 or A15 SMMs
+ (Soft Macrocell Models)
+ - Versatile Express RTSMs (Models)
+
+ You must boot using a Flattened Device Tree in order to use these
+ platforms. The traditional (ATAGs) boot method is not usable on
+ these boards with this option.
+
+if ARCH_VEXPRESS
+
+config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
+ bool "Enable A5 and A9 only errata work-arounds"
+ default y
+ select ARM_ERRATA_643719 if SMP
+ select ARM_ERRATA_720789
+ select PL310_ERRATA_753970 if CACHE_L2X0
+ help
+ Provides common dependencies for Versatile Express platforms
+ based on Cortex-A5 and Cortex-A9 processors. In order to
+ build a working kernel, you must also enable relevant core
+ tile support or Flattened Device Tree based support options.
+
+config ARCH_VEXPRESS_DCSCB
+ bool "Dual Cluster System Control Block (DCSCB) support"
+ depends on MCPM
+ select ARM_CCI400_PORT_CTRL
+ help
+ Support for the Dual Cluster System Configuration Block (DCSCB).
+ This is needed to provide CPU and cluster power management
+ on RTSM implementing big.LITTLE.
+
+config ARCH_VEXPRESS_SPC
+ bool "Versatile Express Serial Power Controller (SPC)"
+ select PM_OPP
+ help
+ The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
+ block called Serial Power Controller (SPC) that provides the interface
+ between the dual cluster test-chip and the M3 microcontroller that
+ carries out power management.
+
+config ARCH_VEXPRESS_TC2_PM
+ bool "Versatile Express TC2 power management"
+ depends on MCPM
+ select ARM_CCI400_PORT_CTRL
+ select ARCH_VEXPRESS_SPC
+ select ARM_CPU_SUSPEND
+ help
+ Support for CPU and cluster power management on Versatile Express
+ with a TC2 (A15x2 A7x3) big.LITTLE core tile.
+
+endif
diff --git a/arch/arm/mach-versatile/Makefile b/arch/arm/mach-versatile/Makefile
index 2b907718d467..27d712bcf1af 100644
--- a/arch/arm/mach-versatile/Makefile
+++ b/arch/arm/mach-versatile/Makefile
@@ -3,4 +3,34 @@
# Makefile for the linux kernel.
#

-obj-y := versatile_dt.o
+# versatile
+obj-$(CONFIG_ARCH_VERSATILE) += versatile.o
+
+# integrator
+obj-$(CONFIG_ARCH_INTEGRATOR) += integrator.o
+obj-$(CONFIG_ARCH_INTEGRATOR_AP) += integrator_ap.o
+obj-$(CONFIG_ARCH_INTEGRATOR_CP) += integrator_cp.o
+
+# realview
+obj-$(CONFIG_ARCH_REALVIEW) += realview.o
+
+# vexpress
+obj-$(CONFIG_ARCH_VEXPRESS) := v2m.o
+obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o
+CFLAGS_dcscb.o += -march=armv7-a
+CFLAGS_REMOVE_dcscb.o = -pg
+obj-$(CONFIG_ARCH_VEXPRESS_SPC) += spc.o
+CFLAGS_REMOVE_spc.o = -pg
+obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM) += tc2_pm.o
+CFLAGS_tc2_pm.o += -march=armv7-a
+CFLAGS_REMOVE_tc2_pm.o = -pg
+
+# mps2
+obj-$(CONFIG_ARCH_MPS2) += v2m-mps2.o
+
+ifdef CONFIG_SMP
+obj-y += headsmp.o platsmp.o
+obj-$(CONFIG_ARCH_REALVIEW) += platsmp-realview.o
+obj-$(CONFIG_ARCH_VEXPRESS) += platsmp-vexpress.o
+obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
+endif
diff --git a/arch/arm/mach-vexpress/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot
similarity index 100%
rename from arch/arm/mach-vexpress/Makefile.boot
rename to arch/arm/mach-versatile/Makefile.boot
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-versatile/dcscb.c
similarity index 97%
rename from arch/arm/mach-vexpress/dcscb.c
rename to arch/arm/mach-versatile/dcscb.c
index a0554d7d04f7..866270e7f271 100644
--- a/arch/arm/mach-vexpress/dcscb.c
+++ b/arch/arm/mach-versatile/dcscb.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * arch/arm/mach-vexpress/dcscb.c - Dual Cluster System Configuration Block
+ * dcscb.c - Dual Cluster System Configuration Block
*
* Created by: Nicolas Pitre, May 2012
* Copyright: (C) 2012-2013 Linaro Limited
@@ -20,7 +20,7 @@
#include <asm/cputype.h>
#include <asm/cp15.h>

-#include "core.h"
+#include "vexpress.h"

#define RST_HOLD0 0x0
#define RST_HOLD1 0x4
diff --git a/arch/arm/mach-vexpress/dcscb_setup.S b/arch/arm/mach-versatile/dcscb_setup.S
similarity index 95%
rename from arch/arm/mach-vexpress/dcscb_setup.S
rename to arch/arm/mach-versatile/dcscb_setup.S
index 0614b2ebd354..92d1fd9d7f6a 100644
--- a/arch/arm/mach-vexpress/dcscb_setup.S
+++ b/arch/arm/mach-versatile/dcscb_setup.S
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
- * arch/arm/include/asm/dcscb_setup.S
- *
* Created by: Dave Martin, 2012-06-22
* Copyright: (C) 2012-2013 Linaro Limited
*/
diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/mach-versatile/headsmp.S
similarity index 94%
rename from arch/arm/plat-versatile/headsmp.S
rename to arch/arm/mach-versatile/headsmp.S
index 09d9fc30c8ca..99c32db412ae 100644
--- a/arch/arm/plat-versatile/headsmp.S
+++ b/arch/arm/mach-versatile/headsmp.S
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
- * linux/arch/arm/plat-versatile/headsmp.S
- *
* Copyright (c) 2003 ARM Limited
* All Rights Reserved
*/
diff --git a/arch/arm/plat-versatile/hotplug.c b/arch/arm/mach-versatile/hotplug.c
similarity index 98%
rename from arch/arm/plat-versatile/hotplug.c
rename to arch/arm/mach-versatile/hotplug.c
index 2e9dca38bec0..5a152175578b 100644
--- a/arch/arm/plat-versatile/hotplug.c
+++ b/arch/arm/mach-versatile/hotplug.c
@@ -15,7 +15,7 @@
#include <asm/smp_plat.h>
#include <asm/cp15.h>

-#include <plat/platsmp.h>
+#include "platsmp.h"

static inline void versatile_immitation_enter_lowpower(unsigned int actrl_mask)
{
diff --git a/arch/arm/mach-integrator/cm.h b/arch/arm/mach-versatile/integrator-cm.h
similarity index 100%
rename from arch/arm/mach-integrator/cm.h
rename to arch/arm/mach-versatile/integrator-cm.h
diff --git a/arch/arm/mach-integrator/hardware.h b/arch/arm/mach-versatile/integrator-hardware.h
similarity index 100%
rename from arch/arm/mach-integrator/hardware.h
rename to arch/arm/mach-versatile/integrator-hardware.h
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-versatile/integrator.c
similarity index 95%
rename from arch/arm/mach-integrator/core.c
rename to arch/arm/mach-versatile/integrator.c
index 0fe5e1dc9d89..fdf9c4db08a7 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-versatile/integrator.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/mach-integrator/core.c
- *
* Copyright (C) 2000-2003 Deep Blue Solutions Ltd
*/
#include <linux/types.h>
@@ -26,9 +24,9 @@
#include <asm/mach-types.h>
#include <asm/mach/time.h>

-#include "hardware.h"
-#include "cm.h"
-#include "common.h"
+#include "integrator-hardware.h"
+#include "integrator-cm.h"
+#include "integrator.h"

static DEFINE_RAW_SPINLOCK(cm_lock);
static void __iomem *cm_base;
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-versatile/integrator.h
similarity index 100%
rename from arch/arm/mach-integrator/common.h
rename to arch/arm/mach-versatile/integrator.h
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-versatile/integrator_ap.c
similarity index 97%
rename from arch/arm/mach-integrator/integrator_ap.c
rename to arch/arm/mach-versatile/integrator_ap.c
index 58b02cbbea72..44a69cc69376 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-versatile/integrator_ap.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * linux/arch/arm/mach-integrator/integrator_ap.c
- *
* Copyright (C) 2000-2003 Deep Blue Solutions Ltd
*/
#include <linux/kernel.h>
@@ -20,9 +18,9 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>

-#include "hardware.h"
-#include "cm.h"
-#include "common.h"
+#include "integrator-hardware.h"
+#include "integrator-cm.h"
+#include "integrator.h"

/* Regmap to the AP system controller */
static struct regmap *ap_syscon_map;
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-versatile/integrator_cp.c
similarity index 96%
rename from arch/arm/mach-integrator/integrator_cp.c
rename to arch/arm/mach-versatile/integrator_cp.c
index b7eb4038798b..2ed4ded56b3f 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-versatile/integrator_cp.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/mach-integrator/integrator_cp.c
- *
* Copyright (C) 2003 Deep Blue Solutions Ltd
*/
#include <linux/kernel.h>
@@ -18,9 +16,9 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>

-#include "hardware.h"
-#include "cm.h"
-#include "common.h"
+#include "integrator-hardware.h"
+#include "integrator-cm.h"
+#include "integrator.h"

/* Base address to the core module header */
static struct regmap *cm_map;
diff --git a/arch/arm/mach-realview/platsmp-dt.c b/arch/arm/mach-versatile/platsmp-realview.c
similarity index 98%
rename from arch/arm/mach-realview/platsmp-dt.c
rename to arch/arm/mach-versatile/platsmp-realview.c
index 5ae783767a5d..5d363385c801 100644
--- a/arch/arm/mach-realview/platsmp-dt.c
+++ b/arch/arm/mach-versatile/platsmp-realview.c
@@ -13,7 +13,7 @@
#include <asm/smp_plat.h>
#include <asm/smp_scu.h>

-#include <plat/platsmp.h>
+#include "platsmp.h"

#define REALVIEW_SYS_FLAGSSET_OFFSET 0x30

diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-versatile/platsmp-vexpress.c
similarity index 96%
rename from arch/arm/mach-vexpress/platsmp.c
rename to arch/arm/mach-versatile/platsmp-vexpress.c
index 99c93124aa68..1ee3c45e71c9 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-versatile/platsmp-vexpress.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/mach-vexpress/platsmp.c
- *
* Copyright (C) 2002 ARM Ltd.
* All Rights Reserved
*/
@@ -16,9 +14,8 @@
#include <asm/smp_scu.h>
#include <asm/mach/map.h>

-#include <plat/platsmp.h>
-
-#include "core.h"
+#include "platsmp.h"
+#include "vexpress.h"

bool __init vexpress_smp_init_ops(void)
{
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/mach-versatile/platsmp.c
similarity index 97%
rename from arch/arm/plat-versatile/platsmp.c
rename to arch/arm/mach-versatile/platsmp.c
index 3567296cec2a..fa7378321e23 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/mach-versatile/platsmp.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/plat-versatile/platsmp.c
- *
* Copyright (C) 2002 ARM Ltd.
* All Rights Reserved
*
@@ -20,7 +18,7 @@
#include <asm/cacheflush.h>
#include <asm/smp_plat.h>

-#include <plat/platsmp.h>
+#include "platsmp.h"

/*
* versatile_cpu_release controls the release of CPUs from the holding
diff --git a/arch/arm/plat-versatile/include/plat/platsmp.h b/arch/arm/mach-versatile/platsmp.h
similarity index 87%
rename from arch/arm/plat-versatile/include/plat/platsmp.h
rename to arch/arm/mach-versatile/platsmp.h
index 500605f48b80..171a0ab72220 100644
--- a/arch/arm/plat-versatile/include/plat/platsmp.h
+++ b/arch/arm/mach-versatile/platsmp.h
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
- * linux/arch/arm/plat-versatile/include/plat/platsmp.h
- *
* Copyright (C) 2011 ARM Ltd.
* All Rights Reserved
*/
diff --git a/arch/arm/mach-realview/realview-dt.c b/arch/arm/mach-versatile/realview.c
similarity index 100%
rename from arch/arm/mach-realview/realview-dt.c
rename to arch/arm/mach-versatile/realview.c
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-versatile/spc.c
similarity index 100%
rename from arch/arm/mach-vexpress/spc.c
rename to arch/arm/mach-versatile/spc.c
diff --git a/arch/arm/mach-vexpress/spc.h b/arch/arm/mach-versatile/spc.h
similarity index 100%
rename from arch/arm/mach-vexpress/spc.h
rename to arch/arm/mach-versatile/spc.h
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-versatile/tc2_pm.c
similarity index 99%
rename from arch/arm/mach-vexpress/tc2_pm.c
rename to arch/arm/mach-versatile/tc2_pm.c
index e96c42ae3602..0fe78da0c109 100644
--- a/arch/arm/mach-vexpress/tc2_pm.c
+++ b/arch/arm/mach-versatile/tc2_pm.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * arch/arm/mach-vexpress/tc2_pm.c - TC2 power management support
- *
* Created by: Nicolas Pitre, October 2012
* Copyright: (C) 2012-2013 Linaro Limited
*
diff --git a/arch/arm/mach-vexpress/v2m-mps2.c b/arch/arm/mach-versatile/v2m-mps2.c
similarity index 100%
rename from arch/arm/mach-vexpress/v2m-mps2.c
rename to arch/arm/mach-versatile/v2m-mps2.c
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-versatile/v2m.c
similarity index 97%
rename from arch/arm/mach-vexpress/v2m.c
rename to arch/arm/mach-versatile/v2m.c
index ffe7c7a85ae9..79afdf2a90b6 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-versatile/v2m.c
@@ -3,7 +3,7 @@
#include <linux/of_address.h>
#include <asm/mach/arch.h>

-#include "core.h"
+#include "vexpress.h"

#define SYS_FLAGSSET 0x030
#define SYS_FLAGSCLR 0x034
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile.c
similarity index 100%
rename from arch/arm/mach-versatile/versatile_dt.c
rename to arch/arm/mach-versatile/versatile.c
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-versatile/vexpress.h
similarity index 100%
rename from arch/arm/mach-vexpress/core.h
rename to arch/arm/mach-versatile/vexpress.h
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
deleted file mode 100644
index 2e6aff5a0f17..000000000000
--- a/arch/arm/mach-vexpress/Kconfig
+++ /dev/null
@@ -1,81 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-menuconfig ARCH_VEXPRESS
- bool "ARM Ltd. Versatile Express family"
- depends on ARCH_MULTI_V7
- select ARCH_SUPPORTS_BIG_ENDIAN
- select ARM_AMBA
- select ARM_GIC
- select ARM_GLOBAL_TIMER
- select ARM_TIMER_SP804
- select GPIOLIB
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_PATA_PLATFORM
- select CLK_ICST
- select NO_IOPORT_MAP
- select PLAT_VERSATILE
- select POWER_RESET
- select POWER_RESET_VEXPRESS
- select POWER_SUPPLY
- select REGULATOR if MMC_ARMMMCI
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
- select VEXPRESS_CONFIG
- help
- This option enables support for systems using Cortex processor based
- ARM core and logic (FPGA) tiles on the Versatile Express motherboard,
- for example:
-
- - CoreTile Express A5x2 (V2P-CA5s)
- - CoreTile Express A9x4 (V2P-CA9)
- - CoreTile Express A15x2 (V2P-CA15)
- - LogicTile Express 13MG (V2F-2XV6) with A5, A7, A9 or A15 SMMs
- (Soft Macrocell Models)
- - Versatile Express RTSMs (Models)
-
- You must boot using a Flattened Device Tree in order to use these
- platforms. The traditional (ATAGs) boot method is not usable on
- these boards with this option.
-
-if ARCH_VEXPRESS
-
-config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
- bool "Enable A5 and A9 only errata work-arounds"
- default y
- select ARM_ERRATA_643719 if SMP
- select ARM_ERRATA_720789
- select PL310_ERRATA_753970 if CACHE_L2X0
- help
- Provides common dependencies for Versatile Express platforms
- based on Cortex-A5 and Cortex-A9 processors. In order to
- build a working kernel, you must also enable relevant core
- tile support or Flattened Device Tree based support options.
-
-config ARCH_VEXPRESS_DCSCB
- bool "Dual Cluster System Control Block (DCSCB) support"
- depends on MCPM
- select ARM_CCI400_PORT_CTRL
- help
- Support for the Dual Cluster System Configuration Block (DCSCB).
- This is needed to provide CPU and cluster power management
- on RTSM implementing big.LITTLE.
-
-config ARCH_VEXPRESS_SPC
- bool "Versatile Express Serial Power Controller (SPC)"
- select PM_OPP
- help
- The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
- block called Serial Power Controller (SPC) that provides the interface
- between the dual cluster test-chip and the M3 microcontroller that
- carries out power management.
-
-config ARCH_VEXPRESS_TC2_PM
- bool "Versatile Express TC2 power management"
- depends on MCPM
- select ARM_CCI400_PORT_CTRL
- select ARCH_VEXPRESS_SPC
- select ARM_CPU_SUSPEND
- help
- Support for CPU and cluster power management on Versatile Express
- with a TC2 (A15x2 A7x3) big.LITTLE core tile.
-
-endif
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile
deleted file mode 100644
index 3651a1ed0f2b..000000000000
--- a/arch/arm/mach-vexpress/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Makefile for the linux kernel.
-#
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := \
- -I$(srctree)/arch/arm/plat-versatile/include
-
-obj-$(CONFIG_ARCH_VEXPRESS) := v2m.o
-obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o
-CFLAGS_dcscb.o += -march=armv7-a
-CFLAGS_REMOVE_dcscb.o = -pg
-obj-$(CONFIG_ARCH_VEXPRESS_SPC) += spc.o
-CFLAGS_REMOVE_spc.o = -pg
-obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM) += tc2_pm.o
-CFLAGS_tc2_pm.o += -march=armv7-a
-CFLAGS_REMOVE_tc2_pm.o = -pg
-obj-$(CONFIG_SMP) += platsmp.o
-
-obj-$(CONFIG_ARCH_MPS2) += v2m-mps2.o
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile
deleted file mode 100644
index 5de44a57c4de..000000000000
--- a/arch/arm/plat-versatile/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
-
-obj-$(CONFIG_SMP) += headsmp.o platsmp.o
-obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
--
2.29.2

2022-04-06 02:19:18

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 10/12] ARM: iop32x: enable multiplatform support

From: Arnd Bergmann <[email protected]>

After iop32x was converted to the generic multi-irq entry
code, nothing really stops us from building it into a
generic kernel.

The two last headers can simply be removed, the mach/irqs.h
gets replaced with the sparse-irq intiialization from the
board specific .nr_irqs value, and the decompressor debug
output can use the debug_ll hack that all other platforms
use.

Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/Kconfig | 14 -----------
arch/arm/mach-iop32x/Kconfig | 17 ++++++++-----
arch/arm/mach-iop32x/em7210.c | 1 +
arch/arm/mach-iop32x/glantank.c | 1 +
arch/arm/mach-iop32x/include/mach/irqs.h | 14 -----------
.../arm/mach-iop32x/include/mach/uncompress.h | 25 -------------------
arch/arm/mach-iop32x/iq31244.c | 1 +
arch/arm/mach-iop32x/iq80321.c | 1 +
arch/arm/mach-iop32x/irqs.h | 2 ++
arch/arm/mach-iop32x/n2100.c | 1 +
10 files changed, 18 insertions(+), 59 deletions(-)
delete mode 100644 arch/arm/mach-iop32x/include/mach/irqs.h
delete mode 100644 arch/arm/mach-iop32x/include/mach/uncompress.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 68b0a857f9e5..94909cadb78a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -356,17 +356,6 @@ config ARCH_FOOTBRIDGE
Support for systems based on the DC21285 companion chip
("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.

-config ARCH_IOP32X
- bool "IOP32x-based"
- select CPU_XSCALE
- select GPIO_IOP
- select GPIOLIB
- select FORCE_PCI
- select PLAT_IOP
- help
- Support for Intel's 80219 and IOP32X (XScale) family of
- processors.
-
config ARCH_IXP4XX
bool "IXP4xx-based"
select ARCH_SUPPORTS_BIG_ENDIAN
@@ -688,9 +677,6 @@ config ARCH_MPS2
config ARCH_ACORN
bool

-config PLAT_IOP
- bool
-
config PLAT_ORION
bool
select CLKSRC_MMIO
diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig
index f1f342cb0509..07dd137b8867 100644
--- a/arch/arm/mach-iop32x/Kconfig
+++ b/arch/arm/mach-iop32x/Kconfig
@@ -1,9 +1,16 @@
# SPDX-License-Identifier: GPL-2.0
-if ARCH_IOP32X
-
-menu "IOP32x Implementation Options"
+menuconfig ARCH_IOP32X
+ bool "IOP32x-based platforms"
+ depends on ARCH_MULTI_V5
+ select CPU_XSCALE
+ select GPIO_IOP
+ select GPIOLIB
+ select FORCE_PCI
+ help
+ Support for Intel's 80219 and IOP32X (XScale) family of
+ processors.

-comment "IOP32x Platform Types"
+if ARCH_IOP32X

config MACH_EP80219
bool
@@ -42,6 +49,4 @@ config MACH_EM7210
board. Say also Y here if you have a SS4000e Baxter Creek NAS
appliance."

-endmenu
-
endif
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c
index d43ced3cd4e7..ac130aba5a6e 100644
--- a/arch/arm/mach-iop32x/em7210.c
+++ b/arch/arm/mach-iop32x/em7210.c
@@ -223,6 +223,7 @@ static void __init em7210_init_machine(void)

MACHINE_START(EM7210, "Lanner EM7210")
.atag_offset = 0x100,
+ .nr_irqs = IOP32X_NR_IRQS,
.map_io = em7210_map_io,
.init_irq = iop32x_init_irq,
.init_time = em7210_timer_init,
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 2fe0f77d1f1d..cd6e7da2ea10 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -205,6 +205,7 @@ static void __init glantank_init_machine(void)
MACHINE_START(GLANTANK, "GLAN Tank")
/* Maintainer: Lennert Buytenhek <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = IOP32X_NR_IRQS,
.map_io = glantank_map_io,
.init_irq = iop32x_init_irq,
.init_time = glantank_timer_init,
diff --git a/arch/arm/mach-iop32x/include/mach/irqs.h b/arch/arm/mach-iop32x/include/mach/irqs.h
deleted file mode 100644
index e09ae5f48aec..000000000000
--- a/arch/arm/mach-iop32x/include/mach/irqs.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * arch/arm/mach-iop32x/include/mach/irqs.h
- *
- * Author: Rory Bolt <[email protected]>
- * Copyright: (C) 2002 Rory Bolt
- */
-
-#ifndef __IRQS_H
-#define __IRQS_H
-
-#define NR_IRQS 33
-
-#endif
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
deleted file mode 100644
index c8548875d942..000000000000
--- a/arch/arm/mach-iop32x/include/mach/uncompress.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-iop32x/include/mach/uncompress.h
- */
-
-#include <asm/types.h>
-#include <asm/mach-types.h>
-#include <linux/serial_reg.h>
-
-#define uart_base ((volatile u8 *)0xfe800000)
-
-#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
-
-static inline void putc(char c)
-{
- while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
- barrier();
- uart_base[UART_TX] = c;
-}
-
-static inline void flush(void)
-{
-}
-
-#define arch_decomp_setup() do { } while (0)
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index 49caaa703881..8b4c29d17265 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -324,6 +324,7 @@ MACHINE_END
MACHINE_START(EP80219, "Intel EP80219")
/* Maintainer: Intel Corp. */
.atag_offset = 0x100,
+ .nr_irqs = IOP32X_NR_IRQS,
.map_io = iq31244_map_io,
.init_irq = iop32x_init_irq,
.init_time = iq31244_timer_init,
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index b455d7073296..d9780c4660cb 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -183,6 +183,7 @@ static void __init iq80321_init_machine(void)
MACHINE_START(IQ80321, "Intel IQ80321")
/* Maintainer: Intel Corp. */
.atag_offset = 0x100,
+ .nr_irqs = IOP32X_NR_IRQS,
.map_io = iq80321_map_io,
.init_irq = iop32x_init_irq,
.init_time = iq80321_timer_init,
diff --git a/arch/arm/mach-iop32x/irqs.h b/arch/arm/mach-iop32x/irqs.h
index e1dfc8b4e7d7..e9fc88e09189 100644
--- a/arch/arm/mach-iop32x/irqs.h
+++ b/arch/arm/mach-iop32x/irqs.h
@@ -43,4 +43,6 @@
#define IRQ_IOP32X_XINT3 IOP_IRQ(30)
#define IRQ_IOP32X_HPI IOP_IRQ(31)

+#define IOP32X_NR_IRQS (IRQ_IOP32X_HPI + 1)
+
#endif
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index bf99e718f8b8..bb1e2e11bf35 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -358,6 +358,7 @@ static void __init n2100_init_machine(void)
MACHINE_START(N2100, "Thecus N2100")
/* Maintainer: Lennert Buytenhek <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = IOP32X_NR_IRQS,
.map_io = n2100_map_io,
.init_irq = iop32x_init_irq,
.init_time = n2100_timer_init,
--
2.29.2

2022-04-06 03:21:23

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 02/12] ARM: ep93xx: renumber interrupts

From: Arnd Bergmann <[email protected]>

With the move to irq domains, no irqchip must start at number 0,
so shift all the hardwired IRQ numbers by one.

Tested-by: Alexander Sverdlin <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/mach-ep93xx/core.c | 4 +-
arch/arm/mach-ep93xx/include/mach/irqs.h | 122 ++++++++++++-----------
2 files changed, 65 insertions(+), 61 deletions(-)

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index a3b4e843456a..e4569a5acc3f 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -75,8 +75,8 @@ void __init ep93xx_map_io(void)
*************************************************************************/
void __init ep93xx_init_irq(void)
{
- vic_init(EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0);
- vic_init(EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK, 0);
+ vic_init(EP93XX_VIC1_BASE, IRQ_EP93XX_VIC0, EP93XX_VIC1_VALID_IRQ_MASK, 0);
+ vic_init(EP93XX_VIC2_BASE, IRQ_EP93XX_VIC1, EP93XX_VIC2_VALID_IRQ_MASK, 0);
}


diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h b/arch/arm/mach-ep93xx/include/mach/irqs.h
index 244daf83ce6d..60c69c4ed7e1 100644
--- a/arch/arm/mach-ep93xx/include/mach/irqs.h
+++ b/arch/arm/mach-ep93xx/include/mach/irqs.h
@@ -6,69 +6,73 @@
#ifndef __ASM_ARCH_IRQS_H
#define __ASM_ARCH_IRQS_H

-#define IRQ_EP93XX_COMMRX 2
-#define IRQ_EP93XX_COMMTX 3
-#define IRQ_EP93XX_TIMER1 4
-#define IRQ_EP93XX_TIMER2 5
-#define IRQ_EP93XX_AACINTR 6
-#define IRQ_EP93XX_DMAM2P0 7
-#define IRQ_EP93XX_DMAM2P1 8
-#define IRQ_EP93XX_DMAM2P2 9
-#define IRQ_EP93XX_DMAM2P3 10
-#define IRQ_EP93XX_DMAM2P4 11
-#define IRQ_EP93XX_DMAM2P5 12
-#define IRQ_EP93XX_DMAM2P6 13
-#define IRQ_EP93XX_DMAM2P7 14
-#define IRQ_EP93XX_DMAM2P8 15
-#define IRQ_EP93XX_DMAM2P9 16
-#define IRQ_EP93XX_DMAM2M0 17
-#define IRQ_EP93XX_DMAM2M1 18
-#define IRQ_EP93XX_GPIO0MUX 19
-#define IRQ_EP93XX_GPIO1MUX 20
-#define IRQ_EP93XX_GPIO2MUX 21
-#define IRQ_EP93XX_GPIO3MUX 22
-#define IRQ_EP93XX_UART1RX 23
-#define IRQ_EP93XX_UART1TX 24
-#define IRQ_EP93XX_UART2RX 25
-#define IRQ_EP93XX_UART2TX 26
-#define IRQ_EP93XX_UART3RX 27
-#define IRQ_EP93XX_UART3TX 28
-#define IRQ_EP93XX_KEY 29
-#define IRQ_EP93XX_TOUCH 30
+#define IRQ_EP93XX_VIC0 1
+
+#define IRQ_EP93XX_COMMRX (IRQ_EP93XX_VIC0 + 2)
+#define IRQ_EP93XX_COMMTX (IRQ_EP93XX_VIC0 + 3)
+#define IRQ_EP93XX_TIMER1 (IRQ_EP93XX_VIC0 + 4)
+#define IRQ_EP93XX_TIMER2 (IRQ_EP93XX_VIC0 + 5)
+#define IRQ_EP93XX_AACINTR (IRQ_EP93XX_VIC0 + 6)
+#define IRQ_EP93XX_DMAM2P0 (IRQ_EP93XX_VIC0 + 7)
+#define IRQ_EP93XX_DMAM2P1 (IRQ_EP93XX_VIC0 + 8)
+#define IRQ_EP93XX_DMAM2P2 (IRQ_EP93XX_VIC0 + 9)
+#define IRQ_EP93XX_DMAM2P3 (IRQ_EP93XX_VIC0 + 10)
+#define IRQ_EP93XX_DMAM2P4 (IRQ_EP93XX_VIC0 + 11)
+#define IRQ_EP93XX_DMAM2P5 (IRQ_EP93XX_VIC0 + 12)
+#define IRQ_EP93XX_DMAM2P6 (IRQ_EP93XX_VIC0 + 13)
+#define IRQ_EP93XX_DMAM2P7 (IRQ_EP93XX_VIC0 + 14)
+#define IRQ_EP93XX_DMAM2P8 (IRQ_EP93XX_VIC0 + 15)
+#define IRQ_EP93XX_DMAM2P9 (IRQ_EP93XX_VIC0 + 16)
+#define IRQ_EP93XX_DMAM2M0 (IRQ_EP93XX_VIC0 + 17)
+#define IRQ_EP93XX_DMAM2M1 (IRQ_EP93XX_VIC0 + 18)
+#define IRQ_EP93XX_GPIO0MUX (IRQ_EP93XX_VIC0 + 19)
+#define IRQ_EP93XX_GPIO1MUX (IRQ_EP93XX_VIC0 + 20)
+#define IRQ_EP93XX_GPIO2MUX (IRQ_EP93XX_VIC0 + 21)
+#define IRQ_EP93XX_GPIO3MUX (IRQ_EP93XX_VIC0 + 22)
+#define IRQ_EP93XX_UART1RX (IRQ_EP93XX_VIC0 + 23)
+#define IRQ_EP93XX_UART1TX (IRQ_EP93XX_VIC0 + 24)
+#define IRQ_EP93XX_UART2RX (IRQ_EP93XX_VIC0 + 25)
+#define IRQ_EP93XX_UART2TX (IRQ_EP93XX_VIC0 + 26)
+#define IRQ_EP93XX_UART3RX (IRQ_EP93XX_VIC0 + 27)
+#define IRQ_EP93XX_UART3TX (IRQ_EP93XX_VIC0 + 28)
+#define IRQ_EP93XX_KEY (IRQ_EP93XX_VIC0 + 29)
+#define IRQ_EP93XX_TOUCH (IRQ_EP93XX_VIC0 + 30)
#define EP93XX_VIC1_VALID_IRQ_MASK 0x7ffffffc

-#define IRQ_EP93XX_EXT0 32
-#define IRQ_EP93XX_EXT1 33
-#define IRQ_EP93XX_EXT2 34
-#define IRQ_EP93XX_64HZ 35
-#define IRQ_EP93XX_WATCHDOG 36
-#define IRQ_EP93XX_RTC 37
-#define IRQ_EP93XX_IRDA 38
-#define IRQ_EP93XX_ETHERNET 39
-#define IRQ_EP93XX_EXT3 40
-#define IRQ_EP93XX_PROG 41
-#define IRQ_EP93XX_1HZ 42
-#define IRQ_EP93XX_VSYNC 43
-#define IRQ_EP93XX_VIDEO_FIFO 44
-#define IRQ_EP93XX_SSP1RX 45
-#define IRQ_EP93XX_SSP1TX 46
-#define IRQ_EP93XX_GPIO4MUX 47
-#define IRQ_EP93XX_GPIO5MUX 48
-#define IRQ_EP93XX_GPIO6MUX 49
-#define IRQ_EP93XX_GPIO7MUX 50
-#define IRQ_EP93XX_TIMER3 51
-#define IRQ_EP93XX_UART1 52
-#define IRQ_EP93XX_SSP 53
-#define IRQ_EP93XX_UART2 54
-#define IRQ_EP93XX_UART3 55
-#define IRQ_EP93XX_USB 56
-#define IRQ_EP93XX_ETHERNET_PME 57
-#define IRQ_EP93XX_DSP 58
-#define IRQ_EP93XX_GPIO_AB 59
-#define IRQ_EP93XX_SAI 60
+#define IRQ_EP93XX_VIC1 (IRQ_EP93XX_VIC0 + 32)
+
+#define IRQ_EP93XX_EXT0 (IRQ_EP93XX_VIC1 + 0)
+#define IRQ_EP93XX_EXT1 (IRQ_EP93XX_VIC1 + 1)
+#define IRQ_EP93XX_EXT2 (IRQ_EP93XX_VIC1 + 2)
+#define IRQ_EP93XX_64HZ (IRQ_EP93XX_VIC1 + 3)
+#define IRQ_EP93XX_WATCHDOG (IRQ_EP93XX_VIC1 + 4)
+#define IRQ_EP93XX_RTC (IRQ_EP93XX_VIC1 + 5)
+#define IRQ_EP93XX_IRDA (IRQ_EP93XX_VIC1 + 6)
+#define IRQ_EP93XX_ETHERNET (IRQ_EP93XX_VIC1 + 7)
+#define IRQ_EP93XX_EXT3 (IRQ_EP93XX_VIC1 + 8)
+#define IRQ_EP93XX_PROG (IRQ_EP93XX_VIC1 + 9)
+#define IRQ_EP93XX_1HZ (IRQ_EP93XX_VIC1 + 10)
+#define IRQ_EP93XX_VSYNC (IRQ_EP93XX_VIC1 + 11)
+#define IRQ_EP93XX_VIDEO_FIFO (IRQ_EP93XX_VIC1 + 12)
+#define IRQ_EP93XX_SSP1RX (IRQ_EP93XX_VIC1 + 13)
+#define IRQ_EP93XX_SSP1TX (IRQ_EP93XX_VIC1 + 14)
+#define IRQ_EP93XX_GPIO4MUX (IRQ_EP93XX_VIC1 + 15)
+#define IRQ_EP93XX_GPIO5MUX (IRQ_EP93XX_VIC1 + 16)
+#define IRQ_EP93XX_GPIO6MUX (IRQ_EP93XX_VIC1 + 17)
+#define IRQ_EP93XX_GPIO7MUX (IRQ_EP93XX_VIC1 + 18)
+#define IRQ_EP93XX_TIMER3 (IRQ_EP93XX_VIC1 + 19)
+#define IRQ_EP93XX_UART1 (IRQ_EP93XX_VIC1 + 20)
+#define IRQ_EP93XX_SSP (IRQ_EP93XX_VIC1 + 21)
+#define IRQ_EP93XX_UART2 (IRQ_EP93XX_VIC1 + 22)
+#define IRQ_EP93XX_UART3 (IRQ_EP93XX_VIC1 + 23)
+#define IRQ_EP93XX_USB (IRQ_EP93XX_VIC1 + 24)
+#define IRQ_EP93XX_ETHERNET_PME (IRQ_EP93XX_VIC1 + 25)
+#define IRQ_EP93XX_DSP (IRQ_EP93XX_VIC1 + 26)
+#define IRQ_EP93XX_GPIO_AB (IRQ_EP93XX_VIC1 + 27)
+#define IRQ_EP93XX_SAI (IRQ_EP93XX_VIC1 + 28)
#define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff

-#define NR_EP93XX_IRQS (64 + 24)
+#define NR_EP93XX_IRQS (IRQ_EP93XX_VIC1 + 32 + 24)

#define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x))
#define EP93XX_BOARD_IRQS 32
--
2.29.2

2022-04-06 10:56:06

by Lukasz Majewski

[permalink] [raw]
Subject: Re: [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local

On Tue, 5 Apr 2022 11:17:42 +0200
Arnd Bergmann <[email protected]> wrote:

> From: Arnd Bergmann <[email protected]>
>
> Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move
> it there.
>
> Cc: Hartley Sweeten <[email protected]>
> Tested-by: Alexander Sverdlin <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ----
> arch/arm/mach-ep93xx/gpio-ep93xx.h | 2 +-
> arch/arm/mach-ep93xx/include/mach/uncompress.h | 1 -
> arch/arm/mach-ep93xx/soc.h | 2 +-
> 4 files changed, 2 insertions(+), 7 deletions(-)
> rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)
>
> diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> b/arch/arm/mach-ep93xx/ep93xx-regs.h similarity index 94%
> rename from arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> rename to arch/arm/mach-ep93xx/ep93xx-regs.h
> index 6839ea032e58..8fa3646de0a4 100644
> --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> +++ b/arch/arm/mach-ep93xx/ep93xx-regs.h
> @@ -1,8 +1,4 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
> - */
> -
> #ifndef __ASM_ARCH_EP93XX_REGS_H
> #define __ASM_ARCH_EP93XX_REGS_H
>
> diff --git a/arch/arm/mach-ep93xx/gpio-ep93xx.h
> b/arch/arm/mach-ep93xx/gpio-ep93xx.h index 242af4a401ea..7b46eb7e5507
> 100644 --- a/arch/arm/mach-ep93xx/gpio-ep93xx.h
> +++ b/arch/arm/mach-ep93xx/gpio-ep93xx.h
> @@ -4,7 +4,7 @@
> #ifndef __GPIO_EP93XX_H
> #define __GPIO_EP93XX_H
>
> -#include <mach/ep93xx-regs.h>
> +#include "ep93xx-regs.h"
>
> #define EP93XX_GPIO_PHYS_BASE
> EP93XX_APB_PHYS(0x00040000) #define EP93XX_GPIO_BASE
> EP93XX_APB_IOMEM(0x00040000) diff --git
> a/arch/arm/mach-ep93xx/include/mach/uncompress.h
> b/arch/arm/mach-ep93xx/include/mach/uncompress.h index
> b3ec1db988db..e20bcab702b2 100644 ---
> a/arch/arm/mach-ep93xx/include/mach/uncompress.h +++
> b/arch/arm/mach-ep93xx/include/mach/uncompress.h @@ -5,7 +5,6 @@
> * Copyright (C) 2006 Lennert Buytenhek <[email protected]>
> */
>
> -#include <mach/ep93xx-regs.h>
> #include <asm/mach-types.h>
>
> static unsigned char __raw_readb(unsigned int ptr)
> diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
> index f0986e288d19..3245ebbd5069 100644
> --- a/arch/arm/mach-ep93xx/soc.h
> +++ b/arch/arm/mach-ep93xx/soc.h
> @@ -9,7 +9,7 @@
> #ifndef _EP93XX_SOC_H
> #define _EP93XX_SOC_H
>
> -#include <mach/ep93xx-regs.h>
> +#include "ep93xx-regs.h"
> #include "irqs.h"
>
> /*

Reviewed-by: Lukasz Majewski <[email protected]>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: [email protected]


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-04-06 11:07:49

by Lukasz Majewski

[permalink] [raw]
Subject: Re: [PATCH 02/12] ARM: ep93xx: renumber interrupts

On Tue, 5 Apr 2022 11:17:40 +0200
Arnd Bergmann <[email protected]> wrote:

> From: Arnd Bergmann <[email protected]>
>
> With the move to irq domains, no irqchip must start at number 0,
> so shift all the hardwired IRQ numbers by one.
>
> Tested-by: Alexander Sverdlin <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> arch/arm/mach-ep93xx/core.c | 4 +-
> arch/arm/mach-ep93xx/include/mach/irqs.h | 122
> ++++++++++++----------- 2 files changed, 65 insertions(+), 61
> deletions(-)
>
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index a3b4e843456a..e4569a5acc3f 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -75,8 +75,8 @@ void __init ep93xx_map_io(void)
> *************************************************************************/
> void __init ep93xx_init_irq(void)
> {
> - vic_init(EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0);
> - vic_init(EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK,
> 0);
> + vic_init(EP93XX_VIC1_BASE, IRQ_EP93XX_VIC0,
> EP93XX_VIC1_VALID_IRQ_MASK, 0);
> + vic_init(EP93XX_VIC2_BASE, IRQ_EP93XX_VIC1,
> EP93XX_VIC2_VALID_IRQ_MASK, 0); }
>
>
> diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h
> b/arch/arm/mach-ep93xx/include/mach/irqs.h index
> 244daf83ce6d..60c69c4ed7e1 100644 ---
> a/arch/arm/mach-ep93xx/include/mach/irqs.h +++
> b/arch/arm/mach-ep93xx/include/mach/irqs.h @@ -6,69 +6,73 @@
> #ifndef __ASM_ARCH_IRQS_H
> #define __ASM_ARCH_IRQS_H
>
> -#define IRQ_EP93XX_COMMRX 2
> -#define IRQ_EP93XX_COMMTX 3
> -#define IRQ_EP93XX_TIMER1 4
> -#define IRQ_EP93XX_TIMER2 5
> -#define IRQ_EP93XX_AACINTR 6
> -#define IRQ_EP93XX_DMAM2P0 7
> -#define IRQ_EP93XX_DMAM2P1 8
> -#define IRQ_EP93XX_DMAM2P2 9
> -#define IRQ_EP93XX_DMAM2P3 10
> -#define IRQ_EP93XX_DMAM2P4 11
> -#define IRQ_EP93XX_DMAM2P5 12
> -#define IRQ_EP93XX_DMAM2P6 13
> -#define IRQ_EP93XX_DMAM2P7 14
> -#define IRQ_EP93XX_DMAM2P8 15
> -#define IRQ_EP93XX_DMAM2P9 16
> -#define IRQ_EP93XX_DMAM2M0 17
> -#define IRQ_EP93XX_DMAM2M1 18
> -#define IRQ_EP93XX_GPIO0MUX 19
> -#define IRQ_EP93XX_GPIO1MUX 20
> -#define IRQ_EP93XX_GPIO2MUX 21
> -#define IRQ_EP93XX_GPIO3MUX 22
> -#define IRQ_EP93XX_UART1RX 23
> -#define IRQ_EP93XX_UART1TX 24
> -#define IRQ_EP93XX_UART2RX 25
> -#define IRQ_EP93XX_UART2TX 26
> -#define IRQ_EP93XX_UART3RX 27
> -#define IRQ_EP93XX_UART3TX 28
> -#define IRQ_EP93XX_KEY 29
> -#define IRQ_EP93XX_TOUCH 30
> +#define IRQ_EP93XX_VIC0 1
> +
> +#define IRQ_EP93XX_COMMRX (IRQ_EP93XX_VIC0 + 2)
> +#define IRQ_EP93XX_COMMTX (IRQ_EP93XX_VIC0 + 3)
> +#define IRQ_EP93XX_TIMER1 (IRQ_EP93XX_VIC0 + 4)
> +#define IRQ_EP93XX_TIMER2 (IRQ_EP93XX_VIC0 + 5)
> +#define IRQ_EP93XX_AACINTR (IRQ_EP93XX_VIC0 + 6)
> +#define IRQ_EP93XX_DMAM2P0 (IRQ_EP93XX_VIC0 + 7)
> +#define IRQ_EP93XX_DMAM2P1 (IRQ_EP93XX_VIC0 + 8)
> +#define IRQ_EP93XX_DMAM2P2 (IRQ_EP93XX_VIC0 + 9)
> +#define IRQ_EP93XX_DMAM2P3 (IRQ_EP93XX_VIC0 + 10)
> +#define IRQ_EP93XX_DMAM2P4 (IRQ_EP93XX_VIC0 + 11)
> +#define IRQ_EP93XX_DMAM2P5 (IRQ_EP93XX_VIC0 + 12)
> +#define IRQ_EP93XX_DMAM2P6 (IRQ_EP93XX_VIC0 + 13)
> +#define IRQ_EP93XX_DMAM2P7 (IRQ_EP93XX_VIC0 + 14)
> +#define IRQ_EP93XX_DMAM2P8 (IRQ_EP93XX_VIC0 + 15)
> +#define IRQ_EP93XX_DMAM2P9 (IRQ_EP93XX_VIC0 + 16)
> +#define IRQ_EP93XX_DMAM2M0 (IRQ_EP93XX_VIC0 + 17)
> +#define IRQ_EP93XX_DMAM2M1 (IRQ_EP93XX_VIC0 + 18)
> +#define IRQ_EP93XX_GPIO0MUX (IRQ_EP93XX_VIC0 + 19)
> +#define IRQ_EP93XX_GPIO1MUX (IRQ_EP93XX_VIC0 + 20)
> +#define IRQ_EP93XX_GPIO2MUX (IRQ_EP93XX_VIC0 + 21)
> +#define IRQ_EP93XX_GPIO3MUX (IRQ_EP93XX_VIC0 + 22)
> +#define IRQ_EP93XX_UART1RX (IRQ_EP93XX_VIC0 + 23)
> +#define IRQ_EP93XX_UART1TX (IRQ_EP93XX_VIC0 + 24)
> +#define IRQ_EP93XX_UART2RX (IRQ_EP93XX_VIC0 + 25)
> +#define IRQ_EP93XX_UART2TX (IRQ_EP93XX_VIC0 + 26)
> +#define IRQ_EP93XX_UART3RX (IRQ_EP93XX_VIC0 + 27)
> +#define IRQ_EP93XX_UART3TX (IRQ_EP93XX_VIC0 + 28)
> +#define IRQ_EP93XX_KEY (IRQ_EP93XX_VIC0 + 29)
> +#define IRQ_EP93XX_TOUCH (IRQ_EP93XX_VIC0 + 30)
> #define EP93XX_VIC1_VALID_IRQ_MASK 0x7ffffffc
>
> -#define IRQ_EP93XX_EXT0 32
> -#define IRQ_EP93XX_EXT1 33
> -#define IRQ_EP93XX_EXT2 34
> -#define IRQ_EP93XX_64HZ 35
> -#define IRQ_EP93XX_WATCHDOG 36
> -#define IRQ_EP93XX_RTC 37
> -#define IRQ_EP93XX_IRDA 38
> -#define IRQ_EP93XX_ETHERNET 39
> -#define IRQ_EP93XX_EXT3 40
> -#define IRQ_EP93XX_PROG 41
> -#define IRQ_EP93XX_1HZ 42
> -#define IRQ_EP93XX_VSYNC 43
> -#define IRQ_EP93XX_VIDEO_FIFO 44
> -#define IRQ_EP93XX_SSP1RX 45
> -#define IRQ_EP93XX_SSP1TX 46
> -#define IRQ_EP93XX_GPIO4MUX 47
> -#define IRQ_EP93XX_GPIO5MUX 48
> -#define IRQ_EP93XX_GPIO6MUX 49
> -#define IRQ_EP93XX_GPIO7MUX 50
> -#define IRQ_EP93XX_TIMER3 51
> -#define IRQ_EP93XX_UART1 52
> -#define IRQ_EP93XX_SSP 53
> -#define IRQ_EP93XX_UART2 54
> -#define IRQ_EP93XX_UART3 55
> -#define IRQ_EP93XX_USB 56
> -#define IRQ_EP93XX_ETHERNET_PME 57
> -#define IRQ_EP93XX_DSP 58
> -#define IRQ_EP93XX_GPIO_AB 59
> -#define IRQ_EP93XX_SAI 60
> +#define IRQ_EP93XX_VIC1 (IRQ_EP93XX_VIC0 + 32)
> +
> +#define IRQ_EP93XX_EXT0 (IRQ_EP93XX_VIC1 + 0)
> +#define IRQ_EP93XX_EXT1 (IRQ_EP93XX_VIC1 + 1)
> +#define IRQ_EP93XX_EXT2 (IRQ_EP93XX_VIC1 + 2)
> +#define IRQ_EP93XX_64HZ (IRQ_EP93XX_VIC1 + 3)
> +#define IRQ_EP93XX_WATCHDOG (IRQ_EP93XX_VIC1 + 4)
> +#define IRQ_EP93XX_RTC (IRQ_EP93XX_VIC1 + 5)
> +#define IRQ_EP93XX_IRDA (IRQ_EP93XX_VIC1 + 6)
> +#define IRQ_EP93XX_ETHERNET (IRQ_EP93XX_VIC1 + 7)
> +#define IRQ_EP93XX_EXT3 (IRQ_EP93XX_VIC1 + 8)
> +#define IRQ_EP93XX_PROG (IRQ_EP93XX_VIC1 + 9)
> +#define IRQ_EP93XX_1HZ (IRQ_EP93XX_VIC1 + 10)
> +#define IRQ_EP93XX_VSYNC (IRQ_EP93XX_VIC1 + 11)
> +#define IRQ_EP93XX_VIDEO_FIFO (IRQ_EP93XX_VIC1 + 12)
> +#define IRQ_EP93XX_SSP1RX (IRQ_EP93XX_VIC1 + 13)
> +#define IRQ_EP93XX_SSP1TX (IRQ_EP93XX_VIC1 + 14)
> +#define IRQ_EP93XX_GPIO4MUX (IRQ_EP93XX_VIC1 + 15)
> +#define IRQ_EP93XX_GPIO5MUX (IRQ_EP93XX_VIC1 + 16)
> +#define IRQ_EP93XX_GPIO6MUX (IRQ_EP93XX_VIC1 + 17)
> +#define IRQ_EP93XX_GPIO7MUX (IRQ_EP93XX_VIC1 + 18)
> +#define IRQ_EP93XX_TIMER3 (IRQ_EP93XX_VIC1 + 19)
> +#define IRQ_EP93XX_UART1 (IRQ_EP93XX_VIC1 + 20)
> +#define IRQ_EP93XX_SSP (IRQ_EP93XX_VIC1 + 21)
> +#define IRQ_EP93XX_UART2 (IRQ_EP93XX_VIC1 + 22)
> +#define IRQ_EP93XX_UART3 (IRQ_EP93XX_VIC1 + 23)
> +#define IRQ_EP93XX_USB (IRQ_EP93XX_VIC1 + 24)
> +#define IRQ_EP93XX_ETHERNET_PME (IRQ_EP93XX_VIC1 + 25)
> +#define IRQ_EP93XX_DSP (IRQ_EP93XX_VIC1 + 26)
> +#define IRQ_EP93XX_GPIO_AB (IRQ_EP93XX_VIC1 + 27)
> +#define IRQ_EP93XX_SAI (IRQ_EP93XX_VIC1 + 28)
> #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff
>
> -#define NR_EP93XX_IRQS (64 + 24)
> +#define NR_EP93XX_IRQS (IRQ_EP93XX_VIC1 + 32
> + 24)
> #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x))
> #define EP93XX_BOARD_IRQS 32

Reviewed-by: Lukasz Majewski <[email protected]>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: [email protected]


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-04-06 12:07:45

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile

On Tue, Apr 5, 2022 at 4:15 PM Sudeep Holla <[email protected]> wrote:
>
> On Tue, Apr 05, 2022 at 11:17:39AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <[email protected]>
> >
> > These are all fairly small platforms by now, and they are
> > closely related. Just move them all into a single directory.
> >
>
> I had forgotten about this. When do you plan to merge this ? I guess for
> v5.19. The reason I ask is that one of the branch triggered loads of
> kernel-doc warning[1] and I was bit confused with the file path. I did post
> the fix[2] for kernel-doc and was planning to send it as fix for v5.18, but
> let me know what do you prefer as it conflicts with this patch.

I originally wanted to merge this back in 2019, hoping we can do it
all for 5.19 now. The problem with the warnings is that moving a file
makes lkp think it's a regression when it otherwise ignores existing
warnings that seem harmless.

I can probably apply the warning fixes on top here, and I think it would
also work to have them in a separate branch, since git usually figures
out the merges across renames.

Arnd

2022-04-06 12:14:38

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile

On Tue, Apr 5, 2022 at 11:18 AM Arnd Bergmann <[email protected]> wrote:

> From: Arnd Bergmann <[email protected]>
>
> These are all fairly small platforms by now, and they are
> closely related. Just move them all into a single directory.
>
> Cc: Linus Walleij <[email protected]>
> Cc: Liviu Dudau <[email protected]>
> Cc: Lorenzo Pieralisi <[email protected]>
> Tested-by: Sudeep Holla <[email protected]>
> Acked-by: Sudeep Holla <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>

Acked-by: Linus Walleij <[email protected]>

I can't test much right now, but I sure trust you with this!

Yours,
Linus Walleij

2022-04-06 13:22:56

by Sudeep Holla

[permalink] [raw]
Subject: Re: [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile

On Tue, Apr 05, 2022 at 11:17:39AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> These are all fairly small platforms by now, and they are
> closely related. Just move them all into a single directory.
>

I had forgotten about this. When do you plan to merge this ? I guess for
v5.19. The reason I ask is that one of the branch triggered loads of
kernel-doc warning[1] and I was bit confused with the file path. I did post
the fix[2] for kernel-doc and was planning to send it as fix for v5.18, but
let me know what do you prefer as it conflicts with this patch.

--
Regards,
Sudeep

[1] https://lore.kernel.org/linux-doc/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

2022-04-07 14:31:22

by Alexander Sverdlin

[permalink] [raw]
Subject: Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> I revisited some patches from a few years back, to see what
> is needed forsome of the remaining platforms to become part of
> CONFIG_ARCH_MULTIPLATFORM.
>
> A few things happened since I last looked at this, which helps to make
> this easier:
>
>  - The ixp4xx platform saw a large scale cleanup
>
>  - The ep93xx platform lost support for MaverickCrunch FPUs and
>    gained support for the common clock subsystem

would you like to consider a couple of fixups from the common clock
rework of ep93xx?

https://lore.kernel.org/linux-arm-kernel/[email protected]/
https://lore.kernel.org/lkml/[email protected]/t/

Thanks!
--
Alexander Sverdlin.

2022-04-07 15:05:02

by Alexander Sverdlin

[permalink] [raw]
Subject: Re: [PATCH 02/12] ARM: ep93xx: renumber interrupts

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> With the move to irq domains, no irqchip must start at number 0,
> so shift all the hardwired IRQ numbers by one.
>
> Tested-by: Alexander Sverdlin <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>

I've successfully tested the whole series on EDB9302, therefore:
Tested-by: Alexander Sverdlin <[email protected]>
Acked-by: Alexander Sverdlin <[email protected]>

> ---
>  arch/arm/mach-ep93xx/core.c              |   4 +-
>  arch/arm/mach-ep93xx/include/mach/irqs.h | 122 ++++++++++++-----------
>  2 files changed, 65 insertions(+), 61 deletions(-)

--
Alexander Sverdlin.

2022-04-07 16:01:13

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions

On Thu, Apr 7, 2022 at 11:23 AM Alexander Sverdlin
<[email protected]> wrote:
>
> Hello Arnd,
>
> On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <[email protected]>
> >
> > I revisited some patches from a few years back, to see what
> > is needed forsome of the remaining platforms to become part of
> > CONFIG_ARCH_MULTIPLATFORM.
> >
> > A few things happened since I last looked at this, which helps to make
> > this easier:
> >
> > - The ixp4xx platform saw a large scale cleanup
> >
> > - The ep93xx platform lost support for MaverickCrunch FPUs and
> > gained support for the common clock subsystem
>
> would you like to consider a couple of fixups from the common clock
> rework of ep93xx?
>
> https://lore.kernel.org/linux-arm-kernel/[email protected]/
> https://lore.kernel.org/lkml/[email protected]/t/

Sure, both look like obvious bugfixes. Shall I apply them to the
fixes branch for 5.18, or as part of the multiplatform series?

Either way, if you have any obvious bugfixes for code you maintain,
and you'd like
to get merged through the soc tree, please send them to [email protected], which
puts them into the patchwork tracker.

Arnd

2022-04-07 16:53:46

by Alexander Sverdlin

[permalink] [raw]
Subject: Re: [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local

Hello Arnd,

On Tue, 2022-04-05 at 11:17 +0200, Arnd Bergmann wrote:
> Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move
> it there.
>
> Cc: Hartley Sweeten <[email protected]>
> Tested-by: Alexander Sverdlin <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>

Acked-by: Alexander Sverdlin <[email protected]>

> ---
>  arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ----
>  arch/arm/mach-ep93xx/gpio-ep93xx.h                    | 2 +-
>  arch/arm/mach-ep93xx/include/mach/uncompress.h        | 1 -
>  arch/arm/mach-ep93xx/soc.h                            | 2 +-
>  4 files changed, 2 insertions(+), 7 deletions(-)
>  rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)

--
Alexander Sverdlin.

2022-04-07 19:52:44

by Alexander Sverdlin

[permalink] [raw]
Subject: Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions

Thanks Arnd!

On Thu, 2022-04-07 at 12:08 +0200, Arnd Bergmann wrote:
> Sure, both look like obvious bugfixes. Shall I apply them to the
> fixes branch for 5.18, or as part of the multiplatform series?

I'm fine with either option if they land not in the recycled bin ;)

> Either way, if you have any obvious bugfixes for code you maintain,
> and you'd like
> to get merged through the soc tree, please send them to [email protected], which
> puts them into the patchwork tracker.

Sounds great, thanks, I'll note this!

--
Alexander Sverdlin.

2022-04-07 20:30:47

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions

On Thu, Apr 7, 2022 at 9:07 AM Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 05/04/2022 11:17, Arnd Bergmann wrote:
> > From: Arnd Bergmann <[email protected]>
> >
> > I revisited some patches from a few years back, to see what
> > is needed forsome of the remaining platforms to become part of
> > CONFIG_ARCH_MULTIPLATFORM.
> >
> > A few things happened since I last looked at this, which helps to make
> > this easier:
> >
> > - The ixp4xx platform saw a large scale cleanup
> >
> > - The ep93xx platform lost support for MaverickCrunch FPUs and
> > gained support for the common clock subsystem
> >
> > - The OMAP1 platform has a proposed patch for the common
> > clock subsystem.
> >
> > - The generic IRQ entry code is now used everywhere, including
> > on IOP32x.
> >
> > - The s3c24xx platform is scheduled for removal next year
>
> Discussion [1] actually did not end with conclusion, but through all the
> time there were no other votes for the platform to stay.

Ok, thanks for the clarification, I misremembered the outcome
of the discussion. I've updated the reference in the mach/io.h
to no longer refer to that, but I still think it's safe to break
readw/writew on BAST ISA devices.

If we finish the multiplatform conversion for all ARMv5, I care
less about dropping s3c24xx entirely as an intermediate step,
but I definitely still like to see any board files and SoCs dropped
that have no users and are just a maintenance burden.

> I will resend my above [1] patch to mention the coming removal.

Ok, thanks!

Arnd

2022-04-07 20:39:53

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions

On 05/04/2022 11:17, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> I revisited some patches from a few years back, to see what
> is needed forsome of the remaining platforms to become part of
> CONFIG_ARCH_MULTIPLATFORM.
>
> A few things happened since I last looked at this, which helps to make
> this easier:
>
> - The ixp4xx platform saw a large scale cleanup
>
> - The ep93xx platform lost support for MaverickCrunch FPUs and
> gained support for the common clock subsystem
>
> - The OMAP1 platform has a proposed patch for the common
> clock subsystem.
>
> - The generic IRQ entry code is now used everywhere, including
> on IOP32x.
>
> - The s3c24xx platform is scheduled for removal next year

Discussion [1] actually did not end with conclusion, but through all the
time there were no other votes for the platform to stay.

I will resend my above [1] patch to mention the coming removal.

[1]
https://lore.kernel.org/linux-samsung-soc/CAK8P3a2Pg8CkXgN8YNhp2U5Kgwf08kQGpLeTsyWKgNpGChC4uQ@mail.gmail.com/


Best regards,
Krzysztof

2022-04-07 21:35:16

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions

On Tue, Apr 5, 2022 at 11:18 AM Arnd Bergmann <[email protected]> wrote:

These two:

> Arnd Bergmann (12):
> ARM: rework endianess selection
> ARM: ixp4xx: enable multiplatform support

Reviewed-by: Linus Walleij <[email protected]>
Tested-by: Linus Walleij <[email protected]>

I booted on the Gateway GW-2348 which has some ethernet,
PCI and compact flash, LED and a button, so I could test a
whole lot of stuff.

However when switching over to multiplatform I needed to severely
overhaul the ixp4xx_defconfig for it to bring the same drivers in as
before, I will send my patch for that which I think need to go in in
tandem with this rework for a smooth transition.

Yours,
Linus Walleij

2022-04-09 02:37:38

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 00/12] ARM: ARMv5 multiplatform conversions

On Thu, Apr 7, 2022 at 10:42 PM Linus Walleij <[email protected]> wrote:
>
> On Tue, Apr 5, 2022 at 11:18 AM Arnd Bergmann <[email protected]> wrote:
>
> These two:
>
> > Arnd Bergmann (12):
> > ARM: rework endianess selection
> > ARM: ixp4xx: enable multiplatform support
>
> Reviewed-by: Linus Walleij <[email protected]>
> Tested-by: Linus Walleij <[email protected]>
>
> I booted on the Gateway GW-2348 which has some ethernet,
> PCI and compact flash, LED and a button, so I could test a
> whole lot of stuff.

Perfect, thanks!

> However when switching over to multiplatform I needed to severely
> overhaul the ixp4xx_defconfig for it to bring the same drivers in as
> before, I will send my patch for that which I think need to go in in
> tandem with this rework for a smooth transition.

Ah right, I was planning to go through the patches again to make
sure I get them all. I did the change for some platforms but at least
missed this one. I folded in this change and will make sure I do the
same for the others as well:

--- a/arch/arm/configs/ixp4xx_defconfig
+++ b/arch/arm/configs/ixp4xx_defconfig
@@ -6,6 +6,7 @@ CONFIG_EXPERT=y
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_IXP4XX=y
CONFIG_MACH_NSLU2=y
CONFIG_MACH_AVILA=y