2019-10-19 08:44:01

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 1/6] ARM: versatile: move integrator/realview/vexpress to versatile

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: Sudeep Holla <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/Kconfig | 7 -
arch/arm/Makefile | 7 +-
arch/arm/mach-integrator/Kconfig | 161 --------
arch/arm/mach-integrator/Makefile | 11 -
arch/arm/mach-realview/Kconfig | 113 ------
arch/arm/mach-realview/Makefile | 8 -
arch/arm/mach-versatile/Kconfig | 360 ++++++++++++++++++
arch/arm/mach-versatile/Makefile | 34 +-
.../Makefile.boot | 0
.../{mach-integrator => mach-versatile}/cm.h | 0
.../common.h | 0
.../core.c | 2 -
.../{mach-vexpress => mach-versatile}/core.h | 0
.../{mach-vexpress => mach-versatile}/dcscb.c | 2 +-
.../dcscb_setup.S | 2 -
.../hardware.h | 0
.../headsmp.S | 2 -
.../hotplug.c | 2 +-
.../impd1.c | 2 -
.../impd1.h | 0
.../integrator_ap.c | 2 -
.../integrator_cp.c | 2 -
.../{mach-integrator => mach-versatile}/lm.c | 2 -
.../{mach-integrator => mach-versatile}/lm.h | 0
.../platsmp-realview.c} | 2 +-
.../platsmp-vexpress.c} | 5 +-
.../platsmp.c | 4 +-
.../include/plat => mach-versatile}/platsmp.h | 2 -
.../realview-dt.c | 0
.../sched-clock.c | 4 +-
.../plat => mach-versatile}/sched_clock.h | 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 | 0
arch/arm/mach-vexpress/Kconfig | 84 ----
arch/arm/mach-vexpress/Makefile | 19 -
arch/arm/plat-versatile/Kconfig | 7 -
arch/arm/plat-versatile/Makefile | 6 -
40 files changed, 400 insertions(+), 454 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-integrator => mach-versatile}/cm.h (100%)
rename arch/arm/{mach-integrator => mach-versatile}/common.h (100%)
rename arch/arm/{mach-integrator => mach-versatile}/core.c (97%)
rename arch/arm/{mach-vexpress => mach-versatile}/core.h (100%)
rename arch/arm/{mach-vexpress => mach-versatile}/dcscb.c (98%)
rename arch/arm/{mach-vexpress => mach-versatile}/dcscb_setup.S (95%)
rename arch/arm/{mach-integrator => mach-versatile}/hardware.h (100%)
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 => mach-versatile}/impd1.c (99%)
rename arch/arm/{mach-integrator => mach-versatile}/impd1.h (100%)
rename arch/arm/{mach-integrator => mach-versatile}/integrator_ap.c (98%)
rename arch/arm/{mach-integrator => mach-versatile}/integrator_cp.c (98%)
rename arch/arm/{mach-integrator => mach-versatile}/lm.c (97%)
rename arch/arm/{mach-integrator => mach-versatile}/lm.h (100%)
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 => mach-versatile}/realview-dt.c (100%)
rename arch/arm/{plat-versatile => mach-versatile}/sched-clock.c (86%)
rename arch/arm/{plat-versatile/include/plat => mach-versatile}/sched_clock.h (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 (100%)
delete mode 100644 arch/arm/mach-vexpress/Kconfig
delete mode 100644 arch/arm/mach-vexpress/Makefile
delete mode 100644 arch/arm/plat-versatile/Kconfig
delete mode 100644 arch/arm/plat-versatile/Makefile

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 330a1685101a..b6681b61e46c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -647,8 +647,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"
@@ -700,8 +698,6 @@ source "arch/arm/mach-qcom/Kconfig"

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

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

source "arch/arm/mach-s3c24xx/Kconfig"
@@ -736,9 +732,6 @@ source "arch/arm/mach-ux500/Kconfig"

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

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

source "arch/arm/mach-zx/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 09622c26a8a4..db39707fa600 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -180,7 +180,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
@@ -188,7 +187,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_PICOXCELL) += picoxcell
machine-$(CONFIG_ARCH_PXA) += pxa
machine-$(CONFIG_ARCH_QCOM) += qcom
machine-$(CONFIG_ARCH_RDA) += rda
-machine-$(CONFIG_ARCH_REALVIEW) += realview
machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
machine-$(CONFIG_ARCH_RPC) += rpc
machine-$(CONFIG_ARCH_S3C24XX) += s3c24xx
@@ -224,11 +221,10 @@ machine-$(CONFIG_ARCH_TANGO) += tango
machine-$(CONFIG_ARCH_TEGRA) += tegra
machine-$(CONFIG_ARCH_U300) += u300
machine-$(CONFIG_ARCH_U8500) += ux500
-machine-$(CONFIG_ARCH_VERSATILE) += versatile
-machine-$(CONFIG_ARCH_VEXPRESS) += vexpress
machine-$(CONFIG_ARCH_VT8500) += vt8500
machine-$(CONFIG_ARCH_ZX) += zx
machine-$(CONFIG_ARCH_ZYNQ) += zynq
+machine-$(CONFIG_PLAT_VERSATILE) += versatile
machine-$(CONFIG_PLAT_SPEAR) += spear

# Platform directory name. This list is sorted alphanumerically
@@ -239,7 +235,6 @@ plat-$(CONFIG_ARCH_S3C64XX) += samsung
plat-$(CONFIG_ARCH_S5PV210) += samsung
plat-$(CONFIG_PLAT_ORION) += orion
plat-$(CONFIG_PLAT_S3C24XX) += samsung
-plat-$(CONFIG_PLAT_VERSATILE) += versatile

ifeq ($(CONFIG_ARCH_EBSA110),y)
# This is what happens if you forget the IOCS16 line.
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig
deleted file mode 100644
index 982eabc36163..000000000000
--- a/arch/arm/mach-integrator/Kconfig
+++ /dev/null
@@ -1,161 +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 COMMON_CLK_VERSATILE
- select HAVE_TCM
- select ICST
- select MFD_SYSCON
- select PLAT_VERSATILE
- select POWER_RESET
- select POWER_RESET_VERSATILE
- select POWER_SUPPLY
- select SOC_INTEGRATOR_CM
- select SPARSE_IRQ
- 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
- 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.
-
- To compile this driver as a module, choose M here: the
- module will be called impd1.
-
-config INTEGRATOR_CM7TDMI
- bool "Integrator/CM7TDMI core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V4 && !MMU
- select CPU_ARM7TDMI
-
-config INTEGRATOR_CM720T
- bool "Integrator/CM720T core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V4T
- select CPU_ARM720T
-
-config INTEGRATOR_CM740T
- bool "Integrator/CM740T core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V4T && !MMU
- select CPU_ARM740T
-
-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_CM940T
- bool "Integrator/CM940T core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V4T && !MMU
- select CPU_ARM940T
-
-config INTEGRATOR_CM946ES
- bool "Integrator/CM946E-S core module"
- depends on ARCH_INTEGRATOR_AP
- depends on ARCH_MULTI_V5 && !MMU
- select CPU_ARM946E
-
-config INTEGRATOR_CM966ES
- bool "Integrator/CM966E-S core module"
- depends on ARCH_INTEGRATOR_AP
- depends on BROKEN # no kernel support
-
-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 (!MMU || 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_CT7T
- bool "Integrator/CT7TD (ARM7TDMI) core tile"
- depends on ARCH_INTEGRATOR_CP
- depends on ARCH_MULTI_V4T && !MMU
- select CPU_ARM7TDMI
-
-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 71b97ffe8d32..000000000000
--- a/arch/arm/mach-integrator/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y := core.o lm.o
-obj-$(CONFIG_ARCH_INTEGRATOR_AP) += integrator_ap.o
-obj-$(CONFIG_ARCH_INTEGRATOR_CP) += integrator_cp.o
-obj-$(CONFIG_INTEGRATOR_IMPD1) += impd1.o
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
deleted file mode 100644
index 44ebbf9ec673..000000000000
--- a/arch/arm/mach-realview/Kconfig
+++ /dev/null
@@ -1,113 +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 COMMON_CLK_VERSATILE
- 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 ICST
- select MACH_REALVIEW_EB if ARCH_MULTI_V5
- select MFD_SYSCON
- select PLAT_VERSATILE
- select PLAT_VERSATILE_SCHED_CLOCK
- select POWER_RESET
- select POWER_RESET_VERSATILE
- select POWER_SUPPLY
- select SOC_REALVIEW
- select USE_OF
- 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
- select HAVE_SMP
- select MIGHT_HAVE_CACHE_L2X0
- 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
- select MIGHT_HAVE_CACHE_L2X0
- 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
- select MIGHT_HAVE_CACHE_L2X0
- 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
- select MIGHT_HAVE_CACHE_L2X0
- 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 HAVE_SMP
- select MIGHT_HAVE_CACHE_L2X0
- 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 f5c275434d6c..e6feca83451b 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -17,3 +17,363 @@ 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 COMMON_CLK_VERSATILE
+ select HAVE_TCM
+ select ICST
+ select MFD_SYSCON
+ select PLAT_VERSATILE
+ select POWER_RESET
+ select POWER_RESET_VERSATILE
+ select POWER_SUPPLY
+ select SOC_INTEGRATOR_CM
+ select SPARSE_IRQ
+ 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
+ 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.
+
+ To compile this driver as a module, choose M here: the
+ module will be called impd1.
+
+config INTEGRATOR_CM7TDMI
+ bool "Integrator/CM7TDMI core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V4 && !MMU
+ select CPU_ARM7TDMI
+
+config INTEGRATOR_CM720T
+ bool "Integrator/CM720T core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V4T
+ select CPU_ARM720T
+
+config INTEGRATOR_CM740T
+ bool "Integrator/CM740T core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V4T && !MMU
+ select CPU_ARM740T
+
+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_CM940T
+ bool "Integrator/CM940T core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V4T && !MMU
+ select CPU_ARM940T
+
+config INTEGRATOR_CM946ES
+ bool "Integrator/CM946E-S core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on ARCH_MULTI_V5 && !MMU
+ select CPU_ARM946E
+
+config INTEGRATOR_CM966ES
+ bool "Integrator/CM966E-S core module"
+ depends on ARCH_INTEGRATOR_AP
+ depends on BROKEN # no kernel support
+
+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 (!MMU || 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_CT7T
+ bool "Integrator/CT7TD (ARM7TDMI) core tile"
+ depends on ARCH_INTEGRATOR_CP
+ depends on ARCH_MULTI_V4T && !MMU
+ select CPU_ARM7TDMI
+
+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 COMMON_CLK_VERSATILE
+ 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 ICST
+ select MACH_REALVIEW_EB if ARCH_MULTI_V5
+ select MFD_SYSCON
+ select PLAT_VERSATILE
+ select PLAT_VERSATILE_SCHED_CLOCK
+ select POWER_RESET
+ select POWER_RESET_VERSATILE
+ select POWER_SUPPLY
+ select SOC_REALVIEW
+ select USE_OF
+ help
+ This enables support for ARM Ltd RealView boards.
+
+if ARCH_REALVIEW
+
+config PLAT_VERSATILE_SCHED_CLOCK
+ bool
+
+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
+ select HAVE_SMP
+ select MIGHT_HAVE_CACHE_L2X0
+ 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
+ select MIGHT_HAVE_CACHE_L2X0
+ 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
+ select MIGHT_HAVE_CACHE_L2X0
+ 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
+ select MIGHT_HAVE_CACHE_L2X0
+ 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 HAVE_SMP
+ select MIGHT_HAVE_CACHE_L2X0
+ 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 COMMON_CLK_VERSATILE
+ select GPIOLIB
+ select HAVE_ARM_SCU if SMP
+ select HAVE_ARM_TWD if SMP
+ select HAVE_PATA_PLATFORM
+ select 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
+ select VEXPRESS_SYSCFG
+ select MFD_VEXPRESS_SYSREG
+ 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..fe8b62714ee1 100644
--- a/arch/arm/mach-versatile/Makefile
+++ b/arch/arm/mach-versatile/Makefile
@@ -3,4 +3,36 @@
# Makefile for the linux kernel.
#

-obj-y := versatile_dt.o
+# versatile
+obj-$(CONFIG_ARCH_VERSATILE) += versatile_dt.o
+
+# integrator
+obj-$(CONFIG_ARCH_INTEGRATOR) += core.o lm.o
+obj-$(CONFIG_ARCH_INTEGRATOR_AP) += integrator_ap.o
+obj-$(CONFIG_ARCH_INTEGRATOR_CP) += integrator_cp.o
+obj-$(CONFIG_INTEGRATOR_IMPD1) += impd1.o
+
+# realview
+obj-$(CONFIG_ARCH_REALVIEW) += realview-dt.o
+obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.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-integrator/cm.h b/arch/arm/mach-versatile/cm.h
similarity index 100%
rename from arch/arm/mach-integrator/cm.h
rename to arch/arm/mach-versatile/cm.h
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-versatile/common.h
similarity index 100%
rename from arch/arm/mach-integrator/common.h
rename to arch/arm/mach-versatile/common.h
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-versatile/core.c
similarity index 97%
rename from arch/arm/mach-integrator/core.c
rename to arch/arm/mach-versatile/core.c
index 9da3ae232211..40294435cfef 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-versatile/core.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>
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-versatile/core.h
similarity index 100%
rename from arch/arm/mach-vexpress/core.h
rename to arch/arm/mach-versatile/core.h
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-versatile/dcscb.c
similarity index 98%
rename from arch/arm/mach-vexpress/dcscb.c
rename to arch/arm/mach-versatile/dcscb.c
index 46a903c88c6a..ced7d6a6cb8f 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
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/mach-integrator/hardware.h b/arch/arm/mach-versatile/hardware.h
similarity index 100%
rename from arch/arm/mach-integrator/hardware.h
rename to arch/arm/mach-versatile/hardware.h
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/impd1.c b/arch/arm/mach-versatile/impd1.c
similarity index 99%
rename from arch/arm/mach-integrator/impd1.c
rename to arch/arm/mach-versatile/impd1.c
index 1ecbea5331d6..89649a3fe332 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-versatile/impd1.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/mach-integrator/impd1.c
- *
* Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved.
*
* This file provides the core support for the IM-PD1 module.
diff --git a/arch/arm/mach-integrator/impd1.h b/arch/arm/mach-versatile/impd1.h
similarity index 100%
rename from arch/arm/mach-integrator/impd1.h
rename to arch/arm/mach-versatile/impd1.h
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-versatile/integrator_ap.c
similarity index 98%
rename from arch/arm/mach-integrator/integrator_ap.c
rename to arch/arm/mach-versatile/integrator_ap.c
index 035069ea2c8b..0001aca181c2 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>
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-versatile/integrator_cp.c
similarity index 98%
rename from arch/arm/mach-integrator/integrator_cp.c
rename to arch/arm/mach-versatile/integrator_cp.c
index b7eb4038798b..9cbcb3e97558 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>
diff --git a/arch/arm/mach-integrator/lm.c b/arch/arm/mach-versatile/lm.c
similarity index 97%
rename from arch/arm/mach-integrator/lm.c
rename to arch/arm/mach-versatile/lm.c
index 55cd173d1d76..1bf3ec2ac770 100644
--- a/arch/arm/mach-integrator/lm.c
+++ b/arch/arm/mach-versatile/lm.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/arch/arm/mach-integrator/lm.c
- *
* Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved.
*/
#include <linux/module.h>
diff --git a/arch/arm/mach-integrator/lm.h b/arch/arm/mach-versatile/lm.h
similarity index 100%
rename from arch/arm/mach-integrator/lm.h
rename to arch/arm/mach-versatile/lm.h
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..a2228c7a3d99 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,8 +14,7 @@
#include <asm/smp_scu.h>
#include <asm/mach/map.h>

-#include <plat/platsmp.h>
-
+#include "platsmp.h"
#include "core.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-dt.c
similarity index 100%
rename from arch/arm/mach-realview/realview-dt.c
rename to arch/arm/mach-versatile/realview-dt.c
diff --git a/arch/arm/plat-versatile/sched-clock.c b/arch/arm/mach-versatile/sched-clock.c
similarity index 86%
rename from arch/arm/plat-versatile/sched-clock.c
rename to arch/arm/mach-versatile/sched-clock.c
index ecb7913d2f53..4e3ffa4156f3 100644
--- a/arch/arm/plat-versatile/sched-clock.c
+++ b/arch/arm/mach-versatile/sched-clock.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * linux/arch/arm/plat-versatile/sched-clock.c
- *
* Copyright (C) 1999 - 2003 ARM Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd
*/
@@ -9,7 +7,7 @@
#include <linux/io.h>
#include <linux/sched_clock.h>

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

static void __iomem *ctr;

diff --git a/arch/arm/plat-versatile/include/plat/sched_clock.h b/arch/arm/mach-versatile/sched_clock.h
similarity index 100%
rename from arch/arm/plat-versatile/include/plat/sched_clock.h
rename to arch/arm/mach-versatile/sched_clock.h
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 100%
rename from arch/arm/mach-vexpress/v2m.c
rename to arch/arm/mach-versatile/v2m.c
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
deleted file mode 100644
index 726a68085c3b..000000000000
--- a/arch/arm/mach-vexpress/Kconfig
+++ /dev/null
@@ -1,84 +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 COMMON_CLK_VERSATILE
- select GPIOLIB
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_PATA_PLATFORM
- select 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
- select VEXPRESS_SYSCFG
- select MFD_VEXPRESS_SYSREG
- 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/Kconfig b/arch/arm/plat-versatile/Kconfig
deleted file mode 100644
index 748238f9f10e..000000000000
--- a/arch/arm/plat-versatile/Kconfig
+++ /dev/null
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-if PLAT_VERSATILE
-
-config PLAT_VERSATILE_SCHED_CLOCK
- bool
-
-endif
diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile
deleted file mode 100644
index e856f0a4ac6e..000000000000
--- a/arch/arm/plat-versatile/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
-
-obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o
-obj-$(CONFIG_SMP) += headsmp.o platsmp.o
-obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
--
2.20.0


2019-10-19 08:45:18

by Arnd Bergmann

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

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

Cc: Hartley Sweeten <[email protected]>
Cc: Alexander Sverdlin <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/mach-ep93xx/crunch-bits.S | 2 +-
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 +-
5 files changed, 3 insertions(+), 8 deletions(-)
rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%)

diff --git a/arch/arm/mach-ep93xx/crunch-bits.S b/arch/arm/mach-ep93xx/crunch-bits.S
index fb2dbf76f09e..e6dd08538bb9 100644
--- a/arch/arm/mach-ep93xx/crunch-bits.S
+++ b/arch/arm/mach-ep93xx/crunch-bits.S
@@ -14,7 +14,7 @@
#include <asm/thread_info.h>
#include <asm/asm-offsets.h>
#include <asm/assembler.h>
-#include <mach/ep93xx-regs.h>
+#include "ep93xx-regs.h"

/*
* We can't use hex constants here due to a bug in gas.
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 770743bbaf80..670884ba754e 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.20.0

2019-10-19 08:45:27

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
globally. Do the minimal conversion by setting .nr_irqs in each
machine descriptor.

Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
.nr_irqs the original value there, while using the plain NR_EP93XX_IRQS
everywhere else.

---
It's been a while since I did this, no idea what else is needed
here or if this is correct at all.

Cc: Hartley Sweeten <[email protected]>
Cc: Alexander Sverdlin <[email protected]>
Cc: Hubert Feurstein <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/Kconfig | 2 ++
arch/arm/mach-ep93xx/adssphere.c | 1 +
arch/arm/mach-ep93xx/edb93xx.c | 8 ++++++++
arch/arm/mach-ep93xx/gesbc9312.c | 1 +
arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 -------
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 | 1 +
arch/arm/mach-ep93xx/ts72xx.c | 3 ++-
arch/arm/mach-ep93xx/vision_ep9307.c | 1 +
11 files changed, 22 insertions(+), 8 deletions(-)
rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (94%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b6681b61e46c..cca3d240a01e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -365,6 +365,8 @@ config ARCH_EP93XX
select CPU_ARM920T
select GENERIC_CLOCKEVENTS
select GPIOLIB
+ select IRQ_DOMAIN
+ select SPARSE_IRQ
help
This enables support for the Cirrus EP93xx series of CPUs.

diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index 57cfd8ebe04f..bb5e7b3c2fba 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -32,6 +32,7 @@ static void __init adssphere_init_machine(void)
MACHINE_START(ADSSPHERE, "ADS Sphere board")
/* Maintainer: Lennert Buytenhek <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index 7b7280c21ee0..19f38f58ff46 100644
--- a/arch/arm/mach-ep93xx/edb93xx.c
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -243,6 +243,7 @@ static void __init edb93xx_init_machine(void)
MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
/* Maintainer: H Hartley Sweeten <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -256,6 +257,7 @@ MACHINE_END
MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
/* Maintainer: George Kashperko <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -269,6 +271,7 @@ MACHINE_END
MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
/* Maintainer: Lennert Buytenhek <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -282,6 +285,7 @@ MACHINE_END
MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
/* Maintainer: Herbert Valerio Riedel <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -295,6 +299,7 @@ MACHINE_END
MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
/* Maintainer: H Hartley Sweeten <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -308,6 +313,7 @@ MACHINE_END
MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
/* Maintainer: Toufeeq Hussain <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -321,6 +327,7 @@ MACHINE_END
MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
/* Maintainer: Lennert Buytenhek <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -334,6 +341,7 @@ MACHINE_END
MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
/* Maintainer: Lennert Buytenhek <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index 8905db1edd5a..6bc86b554864 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -32,6 +32,7 @@ static void __init gesbc9312_init_machine(void)
MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
/* Maintainer: Lennert Buytenhek <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h b/arch/arm/mach-ep93xx/irqs.h
similarity index 94%
rename from arch/arm/mach-ep93xx/include/mach/irqs.h
rename to arch/arm/mach-ep93xx/irqs.h
index 244daf83ce6d..3ffdb3a2f3e4 100644
--- a/arch/arm/mach-ep93xx/include/mach/irqs.h
+++ b/arch/arm/mach-ep93xx/irqs.h
@@ -1,8 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-ep93xx/include/mach/irqs.h
- */
-
#ifndef __ASM_ARCH_IRQS_H
#define __ASM_ARCH_IRQS_H

@@ -73,7 +69,4 @@
#define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x))
#define EP93XX_BOARD_IRQS 32

-#define NR_IRQS (NR_EP93XX_IRQS + EP93XX_BOARD_IRQS)
-
-
#endif
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
index b18ebf26da45..271898b17296 100644
--- a/arch/arm/mach-ep93xx/micro9.c
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -76,6 +76,7 @@ static void __init micro9_init_machine(void)
MACHINE_START(MICRO9, "Contec Micro9-High")
/* Maintainer: Hubert Feurstein <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -89,6 +90,7 @@ MACHINE_END
MACHINE_START(MICRO9M, "Contec Micro9-Mid")
/* Maintainer: Hubert Feurstein <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -102,6 +104,7 @@ MACHINE_END
MACHINE_START(MICRO9L, "Contec Micro9-Lite")
/* Maintainer: Hubert Feurstein <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -115,6 +118,7 @@ MACHINE_END
MACHINE_START(MICRO9S, "Contec Micro9-Slim")
/* Maintainer: Hubert Feurstein <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 8a53b74dc4b2..e2f7243629fe 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -119,6 +119,7 @@ static void __init simone_init_machine(void)
MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
/* Maintainer: Ryan Mallon */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index 703f25f19d51..29c8ea34c8e1 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -153,6 +153,7 @@ static void __init snappercl15_init_machine(void)
MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
/* Maintainer: Ryan Mallon */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h
index f2dace1c9154..770743bbaf80 100644
--- a/arch/arm/mach-ep93xx/soc.h
+++ b/arch/arm/mach-ep93xx/soc.h
@@ -10,6 +10,7 @@
#define _EP93XX_SOC_H

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

/*
* EP93xx Physical Memory Map:
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index e0e1b11032f1..9ac0308f3d71 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -22,7 +22,6 @@

#include "gpio-ep93xx.h"
#include "hardware.h"
-#include <mach/irqs.h>

#include <asm/mach-types.h>
#include <asm/mach/map.h>
@@ -350,6 +349,7 @@ static void __init ts72xx_init_machine(void)
MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
/* Maintainer: Lennert Buytenhek <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ts72xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
@@ -414,6 +414,7 @@ static void __init bk3_init_machine(void)
MACHINE_START(BK3, "Liebherr controller BK3.1")
/* Maintainer: Lukasz Majewski <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS,
.map_io = ts72xx_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index cbcba3136d74..04f9f15be248 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -302,6 +302,7 @@ static void __init vision_init_machine(void)
MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
/* Maintainer: H Hartley Sweeten <[email protected]> */
.atag_offset = 0x100,
+ .nr_irqs = NR_EP93XX_IRQS + EP93XX_BOARD_IRQS,
.map_io = vision_map_io,
.init_irq = ep93xx_init_irq,
.init_time = ep93xx_timer_init,
--
2.20.0

2019-10-19 08:45:44

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 6/6] ARM: orion: unify Makefile/Kconfig files

There is no reason to keep these separate, so move them into
the generic files.

Cc: Jason Cooper <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Gregory Clement <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/mach-orion/Kconfig | 232 ++++++++++++++++++++++++++-
arch/arm/mach-orion/Kconfig.dove | 34 ----
arch/arm/mach-orion/Kconfig.mv78xx0 | 34 ----
arch/arm/mach-orion/Kconfig.orion5x | 170 --------------------
arch/arm/mach-orion/Makefile | 54 +++++--
arch/arm/mach-orion/Makefile.dove | 6 -
arch/arm/mach-orion/Makefile.mv78xx0 | 5 -
arch/arm/mach-orion/Makefile.orion5x | 24 ---
8 files changed, 268 insertions(+), 291 deletions(-)
delete mode 100644 arch/arm/mach-orion/Kconfig.dove
delete mode 100644 arch/arm/mach-orion/Kconfig.mv78xx0
delete mode 100644 arch/arm/mach-orion/Kconfig.orion5x
delete mode 100644 arch/arm/mach-orion/Makefile.dove
delete mode 100644 arch/arm/mach-orion/Makefile.mv78xx0
delete mode 100644 arch/arm/mach-orion/Makefile.orion5x

diff --git a/arch/arm/mach-orion/Kconfig b/arch/arm/mach-orion/Kconfig
index bad1fe673674..67e1e0b0c831 100644
--- a/arch/arm/mach-orion/Kconfig
+++ b/arch/arm/mach-orion/Kconfig
@@ -3,12 +3,238 @@ config PLAT_ORION
select CLKSRC_MMIO
select COMMON_CLK
select GENERIC_IRQ_CHIP
+ select GPIOLIB
select IRQ_DOMAIN
+ select MVEBU_MBUS

config PLAT_ORION_LEGACY
bool
select PLAT_ORION

-source "arch/arm/mach-orion/Kconfig.dove"
-source "arch/arm/mach-orion/Kconfig.mv78xx0"
-source "arch/arm/mach-orion/Kconfig.orion5x"
+menuconfig ARCH_DOVE
+ bool "Marvell Dove" if ARCH_MULTI_V7
+ select CPU_PJ4
+ select PINCTRL
+ select PINCTRL_DOVE
+ select PLAT_ORION_LEGACY
+ select PM_GENERIC_DOMAINS if PM
+ help
+ Support for the Marvell Dove SoC 88AP510
+
+if ARCH_DOVE
+
+config MACH_DOVE_DB
+ bool "Marvell DB-MV88AP510 Development Board"
+ select I2C_BOARDINFO if I2C
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell DB-MV88AP510 Development Board.
+
+config MACH_CM_A510
+ bool "CompuLab CM-A510 Board"
+ help
+ Say 'Y' here if you want your kernel to support the
+ CompuLab CM-A510 Board.
+
+endif
+
+menuconfig ARCH_MV78XX0
+ bool "Marvell MV78xx0"
+ depends on ARCH_MULTI_V5
+ select CPU_FEROCEON
+ select FORCE_PCI
+ select PLAT_ORION_LEGACY
+ help
+ Support for the following Marvell MV78xx0 series SoCs:
+ MV781x0, MV782x0.
+
+if ARCH_MV78XX0
+
+config MACH_DB78X00_BP
+ bool "Marvell DB-78x00-BP Development Board"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell DB-78x00-BP Development Board.
+
+config MACH_RD78X00_MASA
+ bool "Marvell RD-78x00-mASA Reference Design"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell RD-78x00-mASA Reference Design.
+
+config MACH_TERASTATION_WXL
+ bool "Buffalo WLX (Terastation Duo) NAS"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Buffalo WXL Nas.
+
+endif
+
+# SPDX-License-Identifier: GPL-2.0-only
+menuconfig ARCH_ORION5X
+ bool "Marvell Orion"
+ depends on MMU && ARCH_MULTI_V5
+ select CPU_FEROCEON
+ select GENERIC_CLOCKEVENTS
+ select FORCE_PCI
+ select PHYLIB if NETDEVICES
+ select PLAT_ORION_LEGACY
+ help
+ Support for the following Marvell Orion 5x series SoCs:
+ Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
+ Orion-2 (5281), Orion-1-90 (6183).
+
+if ARCH_ORION5X
+
+config ARCH_ORION5X_DT
+ bool "Marvell Orion5x Flattened Device Tree"
+ select USE_OF
+ select ORION_CLK
+ select ORION_IRQCHIP
+ select ORION_TIMER
+ select PINCTRL
+ select PINCTRL_ORION
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell Orion5x using flattened device tree.
+
+config MACH_DB88F5281
+ bool "Marvell Orion-2 Development Board"
+ select I2C_BOARDINFO if I2C
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell Orion-2 (88F5281) Development Board
+
+config MACH_RD88F5182
+ bool "Marvell Orion-NAS Reference Design"
+ select I2C_BOARDINFO if I2C
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell Orion-NAS (88F5182) RD2
+
+config MACH_RD88F5182_DT
+ bool "Marvell Orion-NAS Reference Design (Flattened Device Tree)"
+ select ARCH_ORION5X_DT
+ select I2C_BOARDINFO if I2C
+ help
+ Say 'Y' here if you want your kernel to support the Marvell
+ Orion-NAS (88F5182) RD2, Flattened Device Tree.
+
+config MACH_KUROBOX_PRO
+ bool "KuroBox Pro"
+ select I2C_BOARDINFO if I2C
+ help
+ Say 'Y' here if you want your kernel to support the
+ KuroBox Pro platform.
+
+config MACH_DNS323
+ bool "D-Link DNS-323"
+ select I2C_BOARDINFO if I2C
+ help
+ Say 'Y' here if you want your kernel to support the
+ D-Link DNS-323 platform.
+
+config MACH_TS209
+ bool "QNAP TS-109/TS-209"
+ help
+ Say 'Y' here if you want your kernel to support the
+ QNAP TS-109/TS-209 platform.
+
+config MACH_TERASTATION_PRO2
+ bool "Buffalo Terastation Pro II/Live"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Buffalo Terastation Pro II/Live platform.
+
+config MACH_LINKSTATION_PRO
+ bool "Buffalo Linkstation Pro/Live"
+ select I2C_BOARDINFO if I2C
+ help
+ Say 'Y' here if you want your kernel to support the
+ Buffalo Linkstation Pro/Live platform. Both v1 and
+ v2 devices are supported.
+
+config MACH_LINKSTATION_MINI
+ bool "Buffalo Linkstation Mini (Flattened Device Tree)"
+ select ARCH_ORION5X_DT
+ help
+ Say 'Y' here if you want your kernel to support the
+ Buffalo Linkstation Mini (LS-WSGL) platform.
+
+config MACH_LINKSTATION_LS_HGL
+ bool "Buffalo Linkstation LS-HGL"
+ select I2C_BOARDINFO if I2C
+ help
+ Say 'Y' here if you want your kernel to support the
+ Buffalo Linkstation LS-HGL platform.
+
+config MACH_TS409
+ bool "QNAP TS-409"
+ help
+ Say 'Y' here if you want your kernel to support the
+ QNAP TS-409 platform.
+
+config MACH_WRT350N_V2
+ bool "Linksys WRT350N v2"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Linksys WRT350N v2 platform.
+
+config MACH_TS78XX
+ bool "Technologic Systems TS-78xx"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Technologic Systems TS-78xx platform.
+
+config MACH_MV2120
+ bool "HP Media Vault mv2120"
+ help
+ Say 'Y' here if you want your kernel to support the
+ HP Media Vault mv2120 or mv5100.
+
+config MACH_D2NET_DT
+ bool "LaCie d2 Network / Big Disk Network (Flattened Device Tree)"
+ select ARCH_ORION5X_DT
+ help
+ Say 'Y' here if you want your kernel to support the
+ LaCie d2 Network NAS.
+
+config MACH_NET2BIG
+ bool "LaCie 2Big Network"
+ select I2C_BOARDINFO if I2C
+ help
+ Say 'Y' here if you want your kernel to support the
+ LaCie 2Big Network NAS.
+
+config MACH_MSS2_DT
+ bool "Maxtor Shared Storage II (Flattened Device Tree)"
+ select ARCH_ORION5X_DT
+ help
+ Say 'Y' here if you want your kernel to support the
+ Maxtor Shared Storage II platform.
+
+config MACH_WNR854T
+ bool "Netgear WNR854T"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Netgear WNR854T platform.
+
+config MACH_RD88F5181L_GE
+ bool "Marvell Orion-VoIP GE Reference Design"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell Orion-VoIP GE (88F5181L) RD.
+
+config MACH_RD88F5181L_FXO
+ bool "Marvell Orion-VoIP FXO Reference Design"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell Orion-VoIP FXO (88F5181L) RD.
+
+config MACH_RD88F6183AP_GE
+ bool "Marvell Orion-1-90 AP GE Reference Design"
+ help
+ Say 'Y' here if you want your kernel to support the
+ Marvell Orion-1-90 (88F6183) AP GE RD.
+
+endif
diff --git a/arch/arm/mach-orion/Kconfig.dove b/arch/arm/mach-orion/Kconfig.dove
deleted file mode 100644
index c30c69c664ea..000000000000
--- a/arch/arm/mach-orion/Kconfig.dove
+++ /dev/null
@@ -1,34 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-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
-
-if ARCH_DOVE
-
-config DOVE_LEGACY
- bool
-
-config MACH_DOVE_DB
- bool "Marvell DB-MV88AP510 Development Board"
- select DOVE_LEGACY
- select I2C_BOARDINFO if I2C
- help
- Say 'Y' here if you want your kernel to support the
- Marvell DB-MV88AP510 Development Board.
-
-config MACH_CM_A510
- bool "CompuLab CM-A510 Board"
- select DOVE_LEGACY
- help
- Say 'Y' here if you want your kernel to support the
- CompuLab CM-A510 Board.
-
-endif
diff --git a/arch/arm/mach-orion/Kconfig.mv78xx0 b/arch/arm/mach-orion/Kconfig.mv78xx0
deleted file mode 100644
index ea52c7fabb79..000000000000
--- a/arch/arm/mach-orion/Kconfig.mv78xx0
+++ /dev/null
@@ -1,34 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menuconfig ARCH_MV78XX0
- bool "Marvell MV78xx0"
- depends on ARCH_MULTI_V5
- select CPU_FEROCEON
- select GPIOLIB
- select MVEBU_MBUS
- select FORCE_PCI
- select PLAT_ORION_LEGACY
- help
- Support for the following Marvell MV78xx0 series SoCs:
- MV781x0, MV782x0.
-
-if ARCH_MV78XX0
-
-config MACH_DB78X00_BP
- bool "Marvell DB-78x00-BP Development Board"
- help
- Say 'Y' here if you want your kernel to support the
- Marvell DB-78x00-BP Development Board.
-
-config MACH_RD78X00_MASA
- bool "Marvell RD-78x00-mASA Reference Design"
- help
- Say 'Y' here if you want your kernel to support the
- Marvell RD-78x00-mASA Reference Design.
-
-config MACH_TERASTATION_WXL
- bool "Buffalo WLX (Terastation Duo) NAS"
- help
- Say 'Y' here if you want your kernel to support the
- Buffalo WXL Nas.
-
-endif
diff --git a/arch/arm/mach-orion/Kconfig.orion5x b/arch/arm/mach-orion/Kconfig.orion5x
deleted file mode 100644
index cf9cb3d2590e..000000000000
--- a/arch/arm/mach-orion/Kconfig.orion5x
+++ /dev/null
@@ -1,170 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menuconfig ARCH_ORION5X
- bool "Marvell Orion"
- depends on MMU && ARCH_MULTI_V5
- select CPU_FEROCEON
- select GENERIC_CLOCKEVENTS
- select GPIOLIB
- select MVEBU_MBUS
- select FORCE_PCI
- select PHYLIB if NETDEVICES
- select PLAT_ORION_LEGACY
- help
- Support for the following Marvell Orion 5x series SoCs:
- Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
- Orion-2 (5281), Orion-1-90 (6183).
-
-if ARCH_ORION5X
-
-config ARCH_ORION5X_DT
- bool "Marvell Orion5x Flattened Device Tree"
- select USE_OF
- select ORION_CLK
- select ORION_IRQCHIP
- select ORION_TIMER
- select PINCTRL
- select PINCTRL_ORION
- help
- Say 'Y' here if you want your kernel to support the
- Marvell Orion5x using flattened device tree.
-
-config MACH_DB88F5281
- bool "Marvell Orion-2 Development Board"
- select I2C_BOARDINFO if I2C
- help
- Say 'Y' here if you want your kernel to support the
- Marvell Orion-2 (88F5281) Development Board
-
-config MACH_RD88F5182
- bool "Marvell Orion-NAS Reference Design"
- select I2C_BOARDINFO if I2C
- help
- Say 'Y' here if you want your kernel to support the
- Marvell Orion-NAS (88F5182) RD2
-
-config MACH_RD88F5182_DT
- bool "Marvell Orion-NAS Reference Design (Flattened Device Tree)"
- select ARCH_ORION5X_DT
- select I2C_BOARDINFO if I2C
- help
- Say 'Y' here if you want your kernel to support the Marvell
- Orion-NAS (88F5182) RD2, Flattened Device Tree.
-
-config MACH_KUROBOX_PRO
- bool "KuroBox Pro"
- select I2C_BOARDINFO if I2C
- help
- Say 'Y' here if you want your kernel to support the
- KuroBox Pro platform.
-
-config MACH_DNS323
- bool "D-Link DNS-323"
- select I2C_BOARDINFO if I2C
- help
- Say 'Y' here if you want your kernel to support the
- D-Link DNS-323 platform.
-
-config MACH_TS209
- bool "QNAP TS-109/TS-209"
- help
- Say 'Y' here if you want your kernel to support the
- QNAP TS-109/TS-209 platform.
-
-config MACH_TERASTATION_PRO2
- bool "Buffalo Terastation Pro II/Live"
- help
- Say 'Y' here if you want your kernel to support the
- Buffalo Terastation Pro II/Live platform.
-
-config MACH_LINKSTATION_PRO
- bool "Buffalo Linkstation Pro/Live"
- select I2C_BOARDINFO if I2C
- help
- Say 'Y' here if you want your kernel to support the
- Buffalo Linkstation Pro/Live platform. Both v1 and
- v2 devices are supported.
-
-config MACH_LINKSTATION_MINI
- bool "Buffalo Linkstation Mini (Flattened Device Tree)"
- select ARCH_ORION5X_DT
- help
- Say 'Y' here if you want your kernel to support the
- Buffalo Linkstation Mini (LS-WSGL) platform.
-
-config MACH_LINKSTATION_LS_HGL
- bool "Buffalo Linkstation LS-HGL"
- select I2C_BOARDINFO if I2C
- help
- Say 'Y' here if you want your kernel to support the
- Buffalo Linkstation LS-HGL platform.
-
-config MACH_TS409
- bool "QNAP TS-409"
- help
- Say 'Y' here if you want your kernel to support the
- QNAP TS-409 platform.
-
-config MACH_WRT350N_V2
- bool "Linksys WRT350N v2"
- help
- Say 'Y' here if you want your kernel to support the
- Linksys WRT350N v2 platform.
-
-config MACH_TS78XX
- bool "Technologic Systems TS-78xx"
- help
- Say 'Y' here if you want your kernel to support the
- Technologic Systems TS-78xx platform.
-
-config MACH_MV2120
- bool "HP Media Vault mv2120"
- help
- Say 'Y' here if you want your kernel to support the
- HP Media Vault mv2120 or mv5100.
-
-config MACH_D2NET_DT
- bool "LaCie d2 Network / Big Disk Network (Flattened Device Tree)"
- select ARCH_ORION5X_DT
- help
- Say 'Y' here if you want your kernel to support the
- LaCie d2 Network NAS.
-
-config MACH_NET2BIG
- bool "LaCie 2Big Network"
- select I2C_BOARDINFO if I2C
- help
- Say 'Y' here if you want your kernel to support the
- LaCie 2Big Network NAS.
-
-config MACH_MSS2_DT
- bool "Maxtor Shared Storage II (Flattened Device Tree)"
- select ARCH_ORION5X_DT
- help
- Say 'Y' here if you want your kernel to support the
- Maxtor Shared Storage II platform.
-
-config MACH_WNR854T
- bool "Netgear WNR854T"
- help
- Say 'Y' here if you want your kernel to support the
- Netgear WNR854T platform.
-
-config MACH_RD88F5181L_GE
- bool "Marvell Orion-VoIP GE Reference Design"
- help
- Say 'Y' here if you want your kernel to support the
- Marvell Orion-VoIP GE (88F5181L) RD.
-
-config MACH_RD88F5181L_FXO
- bool "Marvell Orion-VoIP FXO Reference Design"
- help
- Say 'Y' here if you want your kernel to support the
- Marvell Orion-VoIP FXO (88F5181L) RD.
-
-config MACH_RD88F6183AP_GE
- bool "Marvell Orion-1-90 AP GE Reference Design"
- help
- Say 'Y' here if you want your kernel to support the
- Marvell Orion-1-90 (88F6183) AP GE RD.
-
-endif
diff --git a/arch/arm/mach-orion/Makefile b/arch/arm/mach-orion/Makefile
index ded450d9bda3..bcfba0c64587 100644
--- a/arch/arm/mach-orion/Makefile
+++ b/arch/arm/mach-orion/Makefile
@@ -1,21 +1,45 @@
# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for the linux kernel.
-#
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include

-orion-gpio-$(CONFIG_GPIOLIB) += gpio.o
-obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o
-obj-$(CONFIG_PLAT_ORION_LEGACY) += $(orion-gpio-y)
+orion-gpio-$(CONFIG_GPIOLIB) += gpio.o
+obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o time.o common.o mpp.o
+obj-$(CONFIG_PLAT_ORION_LEGACY) += $(orion-gpio-y)

-ifdef CONFIG_ARCH_DOVE
-include $(src)/Makefile.dove
+ifdef CONFIG_PCI
+obj-$(CONFIG_PLAT_ORION_LEGACY) += pcie.o
+obj-$(CONFIG_ARCH_DOVE) += dove-pcie.o
+obj-$(CONFIG_ARCH_MV78XX0) += mv78xx0-pcie.o
+obj-$(CONFIG_ARCH_ORION5X) += orion5x-pci.o
endif

-ifdef CONFIG_ARCH_MV78XX0
-include $(src)/Makefile.mv78xx0
-endif
+obj-$(CONFIG_ARCH_DOVE) += dove-common.o dove-irq.o dove-mpp.o
+obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o
+obj-$(CONFIG_MACH_CM_A510) += cm-a510.o

-ifdef CONFIG_ARCH_ORION5X
-include $(src)/Makefile.orion5x
-endif
+obj-$(CONFIG_ARCH_MV78XX0) += mv78xx0-common.o mv78xx0-mpp.o mv78xx0-irq.o
+obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o
+obj-$(CONFIG_MACH_RD78X00_MASA) += rd78x00-masa-setup.o
+obj-$(CONFIG_MACH_TERASTATION_WXL) += buffalo-wxl-setup.o
+
+obj-$(CONFIG_ARCH_ORION5X) += orion5x.o orion5x-irq.o orion5x-mpp.o
+obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o
+obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o
+obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
+obj-$(CONFIG_MACH_TERASTATION_PRO2) += terastation_pro2-setup.o
+obj-$(CONFIG_MACH_LINKSTATION_PRO) += kurobox_pro-setup.o
+obj-$(CONFIG_MACH_LINKSTATION_LS_HGL) += ls_hgl-setup.o
+obj-$(CONFIG_MACH_DNS323) += dns323-setup.o
+obj-$(CONFIG_MACH_TS209) += ts209-setup.o tsx09-common.o
+obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o
+obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o
+obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o
+obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o
+obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o
+obj-$(CONFIG_MACH_WNR854T) += wnr854t-setup.o
+obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o
+obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o
+obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o
+
+obj-$(CONFIG_ARCH_ORION5X_DT) += board-dt.o
+obj-$(CONFIG_MACH_D2NET_DT) += board-d2net.o
+obj-$(CONFIG_MACH_MSS2_DT) += board-mss2.o
+obj-$(CONFIG_MACH_RD88F5182_DT) += board-rd88f5182.o
diff --git a/arch/arm/mach-orion/Makefile.dove b/arch/arm/mach-orion/Makefile.dove
deleted file mode 100644
index 1e85d595836a..000000000000
--- a/arch/arm/mach-orion/Makefile.dove
+++ /dev/null
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-obj-y += dove-common.o
-obj-$(CONFIG_DOVE_LEGACY) += dove-irq.o dove-mpp.o
-obj-$(CONFIG_PCI) += dove-pcie.o
-obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o
-obj-$(CONFIG_MACH_CM_A510) += cm-a510.o
diff --git a/arch/arm/mach-orion/Makefile.mv78xx0 b/arch/arm/mach-orion/Makefile.mv78xx0
deleted file mode 100644
index c56ee058808a..000000000000
--- a/arch/arm/mach-orion/Makefile.mv78xx0
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-obj-y += mv78xx0-common.o mv78xx0-mpp.o mv78xx0-irq.o mv78xx0-pcie.o
-obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o
-obj-$(CONFIG_MACH_RD78X00_MASA) += rd78x00-masa-setup.o
-obj-$(CONFIG_MACH_TERASTATION_WXL) += buffalo-wxl-setup.o
diff --git a/arch/arm/mach-orion/Makefile.orion5x b/arch/arm/mach-orion/Makefile.orion5x
deleted file mode 100644
index a36c5e504698..000000000000
--- a/arch/arm/mach-orion/Makefile.orion5x
+++ /dev/null
@@ -1,24 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-obj-y += orion5x.o orion5x-pci.o orion5x-irq.o orion5x-mpp.o
-obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o
-obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o
-obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
-obj-$(CONFIG_MACH_TERASTATION_PRO2) += terastation_pro2-setup.o
-obj-$(CONFIG_MACH_LINKSTATION_PRO) += kurobox_pro-setup.o
-obj-$(CONFIG_MACH_LINKSTATION_LS_HGL) += ls_hgl-setup.o
-obj-$(CONFIG_MACH_DNS323) += dns323-setup.o
-obj-$(CONFIG_MACH_TS209) += ts209-setup.o tsx09-common.o
-obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o
-obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o
-obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o
-obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o
-obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o
-obj-$(CONFIG_MACH_WNR854T) += wnr854t-setup.o
-obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o
-obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o
-obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o
-
-obj-$(CONFIG_ARCH_ORION5X_DT) += board-dt.o
-obj-$(CONFIG_MACH_D2NET_DT) += board-d2net.o
-obj-$(CONFIG_MACH_MSS2_DT) += board-mss2.o
-obj-$(CONFIG_MACH_RD88F5182_DT) += board-rd88f5182.o
--
2.20.0

2019-10-19 08:45:51

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 5/6] ARM: orion/mv78xx0/dove: move to a common directory

There are very vew contents left in mv78xx0, dove and the plat-orion
directory, but having the files spread over four places increases
the complexity and requires having shared header files.

Move everything to one directory, adapting the file names where
necessary, but not much else. Additional cleanups that are
enabled by this can come later.

Cc: Jason Cooper <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Gregory Clement <[email protected]>
Cc: Alexander Clouter <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
MAINTAINERS | 7 ++-----
arch/arm/Kconfig | 17 +----------------
arch/arm/Makefile | 5 +----
arch/arm/mach-dove/Makefile | 8 --------
arch/arm/mach-orion/Kconfig | 14 ++++++++++++++
.../Kconfig => mach-orion/Kconfig.dove} | 0
.../Kconfig => mach-orion/Kconfig.mv78xx0} | 0
.../Kconfig => mach-orion/Kconfig.orion5x} | 0
arch/arm/{plat-orion => mach-orion}/Makefile | 12 ++++++++++++
.../arm/{mach-dove => mach-orion}/Makefile.boot | 0
arch/arm/mach-orion/Makefile.dove | 6 ++++++
.../Makefile => mach-orion/Makefile.mv78xx0} | 4 +---
.../Makefile => mach-orion/Makefile.orion5x} | 4 +---
.../include/plat => mach-orion}/addr-map.h | 2 --
.../{mach-orion5x => mach-orion}/board-d2net.c | 6 ++----
.../arm/{mach-orion5x => mach-orion}/board-dt.c | 10 ++++------
.../{mach-orion5x => mach-orion}/board-mss2.c | 4 ++--
.../board-rd88f5182.c | 4 +---
.../buffalo-wxl-setup.c | 6 ++----
arch/arm/{mach-dove => mach-orion}/cm-a510.c | 4 +---
arch/arm/{plat-orion => mach-orion}/common.c | 4 +---
.../include/plat => mach-orion}/common.h | 2 --
.../db78x00-bp-setup.c | 4 +---
.../db88f5281-setup.c | 6 ++----
.../{mach-orion5x => mach-orion}/dns323-setup.c | 8 +++-----
.../dove-bridge-regs.h} | 0
.../common.c => mach-orion/dove-common.c} | 13 +++++--------
.../common.h => mach-orion/dove-common.h} | 2 --
.../{mach-dove => mach-orion}/dove-db-setup.c | 4 +---
.../{mach-dove/irq.c => mach-orion/dove-irq.c} | 12 +++++-------
.../irqs.h => mach-orion/dove-irqs.h} | 0
.../{mach-dove/mpp.c => mach-orion/dove-mpp.c} | 8 +++-----
.../{mach-dove/mpp.h => mach-orion/dove-mpp.h} | 0
.../pcie.c => mach-orion/dove-pcie.c} | 12 +++++-------
.../{mach-dove/pm.h => mach-orion/dove-pm.h} | 2 +-
arch/arm/{mach-dove => mach-orion}/dove.h | 2 +-
arch/arm/{plat-orion => mach-orion}/gpio.c | 4 +---
arch/arm/{plat-orion => mach-orion}/irq.c | 6 ++----
.../include/plat => mach-orion}/irq.h | 2 --
.../kurobox_pro-setup.c | 6 ++----
.../{mach-orion5x => mach-orion}/ls_hgl-setup.c | 6 ++----
arch/arm/{plat-orion => mach-orion}/mpp.c | 6 ++----
.../include/plat => mach-orion}/mpp.h | 2 --
.../{mach-orion5x => mach-orion}/mv2120-setup.c | 4 ++--
.../mv78xx0-bridge-regs.h} | 0
.../common.c => mach-orion/mv78xx0-common.c} | 12 +++++-------
.../common.h => mach-orion/mv78xx0-common.h} | 2 --
.../irq.c => mach-orion/mv78xx0-irq.c} | 10 ++++------
.../irqs.h => mach-orion/mv78xx0-irqs.h} | 0
.../mpp.c => mach-orion/mv78xx0-mpp.c} | 8 +++-----
.../mpp.h => mach-orion/mv78xx0-mpp.h} | 3 +--
.../pcie.c => mach-orion/mv78xx0-pcie.c} | 6 ++----
arch/arm/{mach-mv78xx0 => mach-orion}/mv78xx0.h | 2 +-
.../net2big-setup.c | 8 +++-----
.../include/plat => mach-orion}/orion-gpio.h | 2 --
.../orion5x-bridge-regs.h} | 0
.../common.h => mach-orion/orion5x-common.h} | 0
.../irq.c => mach-orion/orion5x-irq.c} | 10 ++++------
.../irqs.h => mach-orion/orion5x-irqs.h} | 0
.../mpp.c => mach-orion/orion5x-mpp.c} | 8 +++-----
.../mpp.h => mach-orion/orion5x-mpp.h} | 0
.../pci.c => mach-orion/orion5x-pci.c} | 8 +++-----
.../common.c => mach-orion/orion5x.c} | 10 ++++------
arch/arm/{mach-orion5x => mach-orion}/orion5x.h | 2 +-
arch/arm/{plat-orion => mach-orion}/pcie.c | 6 ++----
.../include/plat => mach-orion}/pcie.h | 2 --
.../rd78x00-masa-setup.c | 4 +---
.../rd88f5181l-fxo-setup.c | 6 ++----
.../rd88f5181l-ge-setup.c | 6 ++----
.../rd88f5182-setup.c | 6 ++----
.../rd88f6183ap-ge-setup.c | 4 +---
.../terastation_pro2-setup.c | 4 ++--
arch/arm/{plat-orion => mach-orion}/time.c | 4 +---
.../include/plat => mach-orion}/time.h | 2 --
.../{mach-orion5x => mach-orion}/ts209-setup.c | 4 ++--
.../{mach-orion5x => mach-orion}/ts409-setup.c | 4 ++--
.../{mach-orion5x => mach-orion}/ts78xx-fpga.h | 0
.../{mach-orion5x => mach-orion}/ts78xx-setup.c | 6 ++----
.../{mach-orion5x => mach-orion}/tsx09-common.c | 4 +---
.../{mach-orion5x => mach-orion}/tsx09-common.h | 0
.../wnr854t-setup.c | 6 ++----
.../wrt350n-v2-setup.c | 6 ++----
82 files changed, 147 insertions(+), 246 deletions(-)
delete mode 100644 arch/arm/mach-dove/Makefile
create mode 100644 arch/arm/mach-orion/Kconfig
rename arch/arm/{mach-dove/Kconfig => mach-orion/Kconfig.dove} (100%)
rename arch/arm/{mach-mv78xx0/Kconfig => mach-orion/Kconfig.mv78xx0} (100%)
rename arch/arm/{mach-orion5x/Kconfig => mach-orion/Kconfig.orion5x} (100%)
rename arch/arm/{plat-orion => mach-orion}/Makefile (62%)
rename arch/arm/{mach-dove => mach-orion}/Makefile.boot (100%)
create mode 100644 arch/arm/mach-orion/Makefile.dove
rename arch/arm/{mach-mv78xx0/Makefile => mach-orion/Makefile.mv78xx0} (62%)
rename arch/arm/{mach-orion5x/Makefile => mach-orion/Makefile.orion5x} (90%)
rename arch/arm/{plat-orion/include/plat => mach-orion}/addr-map.h (96%)
rename arch/arm/{mach-orion5x => mach-orion}/board-d2net.c (97%)
rename arch/arm/{mach-orion5x => mach-orion}/board-dt.c (94%)
rename arch/arm/{mach-orion5x => mach-orion}/board-mss2.c (97%)
rename arch/arm/{mach-orion5x => mach-orion}/board-rd88f5182.c (97%)
rename arch/arm/{mach-mv78xx0 => mach-orion}/buffalo-wxl-setup.c (97%)
rename arch/arm/{mach-dove => mach-orion}/cm-a510.c (97%)
rename arch/arm/{plat-orion => mach-orion}/common.c (99%)
rename arch/arm/{plat-orion/include/plat => mach-orion}/common.h (98%)
rename arch/arm/{mach-mv78xx0 => mach-orion}/db78x00-bp-setup.c (97%)
rename arch/arm/{mach-orion5x => mach-orion}/db88f5281-setup.c (99%)
rename arch/arm/{mach-orion5x => mach-orion}/dns323-setup.c (99%)
rename arch/arm/{mach-dove/bridge-regs.h => mach-orion/dove-bridge-regs.h} (100%)
rename arch/arm/{mach-dove/common.c => mach-orion/dove-common.c} (98%)
rename arch/arm/{mach-dove/common.h => mach-orion/dove-common.h} (97%)
rename arch/arm/{mach-dove => mach-orion}/dove-db-setup.c (97%)
rename arch/arm/{mach-dove/irq.c => mach-orion/dove-irq.c} (92%)
rename arch/arm/{mach-dove/irqs.h => mach-orion/dove-irqs.h} (100%)
rename arch/arm/{mach-dove/mpp.c => mach-orion/dove-mpp.c} (97%)
rename arch/arm/{mach-dove/mpp.h => mach-orion/dove-mpp.h} (100%)
rename arch/arm/{mach-dove/pcie.c => mach-orion/dove-pcie.c} (97%)
rename arch/arm/{mach-dove/pm.h => mach-orion/dove-pm.h} (99%)
rename arch/arm/{mach-dove => mach-orion}/dove.h (99%)
rename arch/arm/{plat-orion => mach-orion}/gpio.c (99%)
rename arch/arm/{plat-orion => mach-orion}/irq.c (92%)
rename arch/arm/{plat-orion/include/plat => mach-orion}/irq.h (88%)
rename arch/arm/{mach-orion5x => mach-orion}/kurobox_pro-setup.c (99%)
rename arch/arm/{mach-orion5x => mach-orion}/ls_hgl-setup.c (98%)
rename arch/arm/{plat-orion => mach-orion}/mpp.c (95%)
rename arch/arm/{plat-orion/include/plat => mach-orion}/mpp.h (95%)
rename arch/arm/{mach-orion5x => mach-orion}/mv2120-setup.c (99%)
rename arch/arm/{mach-mv78xx0/bridge-regs.h => mach-orion/mv78xx0-bridge-regs.h} (100%)
rename arch/arm/{mach-mv78xx0/common.c => mach-orion/mv78xx0-common.c} (98%)
rename arch/arm/{mach-mv78xx0/common.h => mach-orion/mv78xx0-common.h} (97%)
rename arch/arm/{mach-mv78xx0/irq.c => mach-orion/mv78xx0-irq.c} (93%)
rename arch/arm/{mach-mv78xx0/irqs.h => mach-orion/mv78xx0-irqs.h} (100%)
rename arch/arm/{mach-mv78xx0/mpp.c => mach-orion/mv78xx0-mpp.c} (91%)
rename arch/arm/{mach-mv78xx0/mpp.h => mach-orion/mv78xx0-mpp.h} (99%)
rename arch/arm/{mach-mv78xx0/pcie.c => mach-orion/mv78xx0-pcie.c} (98%)
rename arch/arm/{mach-mv78xx0 => mach-orion}/mv78xx0.h (99%)
rename arch/arm/{mach-orion5x => mach-orion}/net2big-setup.c (99%)
rename arch/arm/{plat-orion/include/plat => mach-orion}/orion-gpio.h (94%)
rename arch/arm/{mach-orion5x/bridge-regs.h => mach-orion/orion5x-bridge-regs.h} (100%)
rename arch/arm/{mach-orion5x/common.h => mach-orion/orion5x-common.h} (100%)
rename arch/arm/{mach-orion5x/irq.c => mach-orion/orion5x-irq.c} (89%)
rename arch/arm/{mach-orion5x/irqs.h => mach-orion/orion5x-irqs.h} (100%)
rename arch/arm/{mach-orion5x/mpp.c => mach-orion/orion5x-mpp.c} (92%)
rename arch/arm/{mach-orion5x/mpp.h => mach-orion/orion5x-mpp.h} (100%)
rename arch/arm/{mach-orion5x/pci.c => mach-orion/orion5x-pci.c} (99%)
rename arch/arm/{mach-orion5x/common.c => mach-orion/orion5x.c} (99%)
rename arch/arm/{mach-orion5x => mach-orion}/orion5x.h (99%)
rename arch/arm/{plat-orion => mach-orion}/pcie.c (98%)
rename arch/arm/{plat-orion/include/plat => mach-orion}/pcie.h (96%)
rename arch/arm/{mach-mv78xx0 => mach-orion}/rd78x00-masa-setup.c (96%)
rename arch/arm/{mach-orion5x => mach-orion}/rd88f5181l-fxo-setup.c (98%)
rename arch/arm/{mach-orion5x => mach-orion}/rd88f5181l-ge-setup.c (98%)
rename arch/arm/{mach-orion5x => mach-orion}/rd88f5182-setup.c (98%)
rename arch/arm/{mach-orion5x => mach-orion}/rd88f6183ap-ge-setup.c (97%)
rename arch/arm/{mach-orion5x => mach-orion}/terastation_pro2-setup.c (99%)
rename arch/arm/{plat-orion => mach-orion}/time.c (99%)
rename arch/arm/{plat-orion/include/plat => mach-orion}/time.h (90%)
rename arch/arm/{mach-orion5x => mach-orion}/ts209-setup.c (99%)
rename arch/arm/{mach-orion5x => mach-orion}/ts409-setup.c (99%)
rename arch/arm/{mach-orion5x => mach-orion}/ts78xx-fpga.h (100%)
rename arch/arm/{mach-orion5x => mach-orion}/ts78xx-setup.c (99%)
rename arch/arm/{mach-orion5x => mach-orion}/tsx09-common.c (97%)
rename arch/arm/{mach-orion5x => mach-orion}/tsx09-common.h (100%)
rename arch/arm/{mach-orion5x => mach-orion}/wnr854t-setup.c (98%)
rename arch/arm/{mach-orion5x => mach-orion}/wrt350n-v2-setup.c (98%)

diff --git a/MAINTAINERS b/MAINTAINERS
index a69e6db80c79..28aa06350435 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1889,10 +1889,7 @@ M: Gregory Clement <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/soc/dove/
-F: arch/arm/mach-dove/
-F: arch/arm/mach-mv78xx0/
-F: arch/arm/mach-orion5x/
-F: arch/arm/plat-orion/
+F: arch/arm/mach-orion/
F: arch/arm/boot/dts/dove*
F: arch/arm/boot/dts/orion5x*
T: git git://git.infradead.org/linux-mvebu.git
@@ -2050,7 +2047,7 @@ M: Alexander Clouter <[email protected]>
L: [email protected] (moderated for non-subscribers)
W: http://www.digriz.org.uk/ts78xx/kernel
S: Maintained
-F: arch/arm/mach-orion5x/ts78xx-*
+F: arch/arm/mach-orion/ts78xx-*

ARM/OXNAS platform support
M: Neil Armstrong <[email protected]>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index eb019bc7a370..f9db9f390c1b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -616,8 +616,6 @@ source "arch/arm/mach-davinci/Kconfig"

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

-source "arch/arm/mach-dove/Kconfig"
-
source "arch/arm/mach-ep93xx/Kconfig"

source "arch/arm/mach-exynos/Kconfig"
@@ -651,8 +649,6 @@ source "arch/arm/mach-mmp/Kconfig"

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

-source "arch/arm/mach-mv78xx0/Kconfig"
-
source "arch/arm/mach-mvebu/Kconfig"

source "arch/arm/mach-mxs/Kconfig"
@@ -669,7 +665,7 @@ source "arch/arm/mach-omap1/Kconfig"

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

-source "arch/arm/mach-orion5x/Kconfig"
+source "arch/arm/mach-orion/Kconfig"

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

@@ -764,17 +760,6 @@ config PLAT_IOP
bool
select GENERIC_CLOCKEVENTS

-config PLAT_ORION
- bool
- select CLKSRC_MMIO
- select COMMON_CLK
- select GENERIC_IRQ_CHIP
- select IRQ_DOMAIN
-
-config PLAT_ORION_LEGACY
- bool
- select PLAT_ORION
-
config PLAT_VERSATILE
bool

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index db39707fa600..f74668401ef6 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -171,7 +171,6 @@ machine-$(CONFIG_ARCH_CLPS711X) += clps711x
machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx
machine-$(CONFIG_ARCH_DAVINCI) += davinci
machine-$(CONFIG_ARCH_DIGICOLOR) += digicolor
-machine-$(CONFIG_ARCH_DOVE) += dove
machine-$(CONFIG_ARCH_EBSA110) += ebsa110
machine-$(CONFIG_ARCH_EFM32) += efm32
machine-$(CONFIG_ARCH_EP93XX) += ep93xx
@@ -188,7 +187,6 @@ machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
machine-$(CONFIG_ARCH_MESON) += meson
machine-$(CONFIG_ARCH_MMP) += mmp
machine-$(CONFIG_ARCH_MOXART) += moxart
-machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0
machine-$(CONFIG_ARCH_MVEBU) += mvebu
machine-$(CONFIG_ARCH_MXC) += imx
machine-$(CONFIG_ARCH_MEDIATEK) += mediatek
@@ -200,7 +198,7 @@ machine-$(CONFIG_ARCH_NSPIRE) += nspire
machine-$(CONFIG_ARCH_OXNAS) += oxnas
machine-$(CONFIG_ARCH_OMAP1) += omap1
machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
-machine-$(CONFIG_ARCH_ORION5X) += orion5x
+machine-$(CONFIG_PLAT_ORION) += orion
machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell
machine-$(CONFIG_ARCH_PXA) += pxa
machine-$(CONFIG_ARCH_QCOM) += qcom
@@ -233,7 +231,6 @@ plat-$(CONFIG_ARCH_EXYNOS) += samsung
plat-$(CONFIG_ARCH_OMAP) += omap
plat-$(CONFIG_ARCH_S3C64XX) += samsung
plat-$(CONFIG_ARCH_S5PV210) += samsung
-plat-$(CONFIG_PLAT_ORION) += orion
plat-$(CONFIG_PLAT_S3C24XX) += samsung

ifeq ($(CONFIG_ARCH_EBSA110),y)
diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile
deleted file mode 100644
index e83f6492834d..000000000000
--- a/arch/arm/mach-dove/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# 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
-obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o
-obj-$(CONFIG_MACH_CM_A510) += cm-a510.o
diff --git a/arch/arm/mach-orion/Kconfig b/arch/arm/mach-orion/Kconfig
new file mode 100644
index 000000000000..bad1fe673674
--- /dev/null
+++ b/arch/arm/mach-orion/Kconfig
@@ -0,0 +1,14 @@
+config PLAT_ORION
+ bool
+ select CLKSRC_MMIO
+ select COMMON_CLK
+ select GENERIC_IRQ_CHIP
+ select IRQ_DOMAIN
+
+config PLAT_ORION_LEGACY
+ bool
+ select PLAT_ORION
+
+source "arch/arm/mach-orion/Kconfig.dove"
+source "arch/arm/mach-orion/Kconfig.mv78xx0"
+source "arch/arm/mach-orion/Kconfig.orion5x"
diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-orion/Kconfig.dove
similarity index 100%
rename from arch/arm/mach-dove/Kconfig
rename to arch/arm/mach-orion/Kconfig.dove
diff --git a/arch/arm/mach-mv78xx0/Kconfig b/arch/arm/mach-orion/Kconfig.mv78xx0
similarity index 100%
rename from arch/arm/mach-mv78xx0/Kconfig
rename to arch/arm/mach-orion/Kconfig.mv78xx0
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion/Kconfig.orion5x
similarity index 100%
rename from arch/arm/mach-orion5x/Kconfig
rename to arch/arm/mach-orion/Kconfig.orion5x
diff --git a/arch/arm/plat-orion/Makefile b/arch/arm/mach-orion/Makefile
similarity index 62%
rename from arch/arm/plat-orion/Makefile
rename to arch/arm/mach-orion/Makefile
index 4e3f25de13c1..ded450d9bda3 100644
--- a/arch/arm/plat-orion/Makefile
+++ b/arch/arm/mach-orion/Makefile
@@ -7,3 +7,15 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
orion-gpio-$(CONFIG_GPIOLIB) += gpio.o
obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o
obj-$(CONFIG_PLAT_ORION_LEGACY) += $(orion-gpio-y)
+
+ifdef CONFIG_ARCH_DOVE
+include $(src)/Makefile.dove
+endif
+
+ifdef CONFIG_ARCH_MV78XX0
+include $(src)/Makefile.mv78xx0
+endif
+
+ifdef CONFIG_ARCH_ORION5X
+include $(src)/Makefile.orion5x
+endif
diff --git a/arch/arm/mach-dove/Makefile.boot b/arch/arm/mach-orion/Makefile.boot
similarity index 100%
rename from arch/arm/mach-dove/Makefile.boot
rename to arch/arm/mach-orion/Makefile.boot
diff --git a/arch/arm/mach-orion/Makefile.dove b/arch/arm/mach-orion/Makefile.dove
new file mode 100644
index 000000000000..1e85d595836a
--- /dev/null
+++ b/arch/arm/mach-orion/Makefile.dove
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-y += dove-common.o
+obj-$(CONFIG_DOVE_LEGACY) += dove-irq.o dove-mpp.o
+obj-$(CONFIG_PCI) += dove-pcie.o
+obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o
+obj-$(CONFIG_MACH_CM_A510) += cm-a510.o
diff --git a/arch/arm/mach-mv78xx0/Makefile b/arch/arm/mach-orion/Makefile.mv78xx0
similarity index 62%
rename from arch/arm/mach-mv78xx0/Makefile
rename to arch/arm/mach-orion/Makefile.mv78xx0
index a839e960b8c6..c56ee058808a 100644
--- a/arch/arm/mach-mv78xx0/Makefile
+++ b/arch/arm/mach-orion/Makefile.mv78xx0
@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
-
-obj-y += common.o mpp.o irq.o pcie.o
+obj-y += mv78xx0-common.o mv78xx0-mpp.o mv78xx0-irq.o mv78xx0-pcie.o
obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o
obj-$(CONFIG_MACH_RD78X00_MASA) += rd78x00-masa-setup.o
obj-$(CONFIG_MACH_TERASTATION_WXL) += buffalo-wxl-setup.o
diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion/Makefile.orion5x
similarity index 90%
rename from arch/arm/mach-orion5x/Makefile
rename to arch/arm/mach-orion/Makefile.orion5x
index 1a585a62d5e6..a36c5e504698 100644
--- a/arch/arm/mach-orion5x/Makefile
+++ b/arch/arm/mach-orion/Makefile.orion5x
@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
-
-obj-y += common.o pci.o irq.o mpp.o
+obj-y += orion5x.o orion5x-pci.o orion5x-irq.o orion5x-mpp.o
obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o
obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o
obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
diff --git a/arch/arm/plat-orion/include/plat/addr-map.h b/arch/arm/mach-orion/addr-map.h
similarity index 96%
rename from arch/arm/plat-orion/include/plat/addr-map.h
rename to arch/arm/mach-orion/addr-map.h
index b76c06569fe5..65fedcc1cf6f 100644
--- a/arch/arm/plat-orion/include/plat/addr-map.h
+++ b/arch/arm/mach-orion/addr-map.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/include/plat/addr-map.h
- *
* Marvell Orion SoC address map handling.
*
* This file is licensed under the terms of the GNU General Public
diff --git a/arch/arm/mach-orion5x/board-d2net.c b/arch/arm/mach-orion/board-d2net.c
similarity index 97%
rename from arch/arm/mach-orion5x/board-d2net.c
rename to arch/arm/mach-orion/board-d2net.c
index a89376a5cd92..7dcd274bd6e1 100644
--- a/arch/arm/mach-orion5x/board-d2net.c
+++ b/arch/arm/mach-orion/board-d2net.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/board-d2net.c
- *
* LaCie d2Network and Big Disk Network NAS setup
*
* Copyright (C) 2009 Simon Guinot <[email protected]>
@@ -20,8 +18,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
-#include <plat/orion-gpio.h>
-#include "common.h"
+#include "orion-gpio.h"
+#include "orion5x-common.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion/board-dt.c
similarity index 94%
rename from arch/arm/mach-orion5x/board-dt.c
rename to arch/arm/mach-orion/board-dt.c
index 3d36f1d95196..85368319342f 100644
--- a/arch/arm/mach-orion5x/board-dt.c
+++ b/arch/arm/mach-orion/board-dt.c
@@ -1,8 +1,6 @@
/*
* Copyright 2012 (C), Thomas Petazzoni <[email protected]>
*
- * arch/arm/mach-orion5x/board-dt.c
- *
* Flattened Device Tree board initialization
*
* This file is licensed under the terms of the GNU General Public
@@ -20,11 +18,11 @@
#include <asm/system_misc.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
-#include <plat/irq.h>
-#include <plat/time.h>
+#include "irq.h"
+#include "time.h"
#include "orion5x.h"
-#include "bridge-regs.h"
-#include "common.h"
+#include "orion5x-bridge-regs.h"
+#include "orion5x-common.h"

static struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
diff --git a/arch/arm/mach-orion5x/board-mss2.c b/arch/arm/mach-orion/board-mss2.c
similarity index 97%
rename from arch/arm/mach-orion5x/board-mss2.c
rename to arch/arm/mach-orion/board-mss2.c
index b0f16d223adf..6ab26b2dac84 100644
--- a/arch/arm/mach-orion5x/board-mss2.c
+++ b/arch/arm/mach-orion/board-mss2.c
@@ -14,8 +14,8 @@
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include "orion5x.h"
-#include "bridge-regs.h"
-#include "common.h"
+#include "orion5x-bridge-regs.h"
+#include "orion5x-common.h"

/*****************************************************************************
* Maxtor Shared Storage II Info
diff --git a/arch/arm/mach-orion5x/board-rd88f5182.c b/arch/arm/mach-orion/board-rd88f5182.c
similarity index 97%
rename from arch/arm/mach-orion5x/board-rd88f5182.c
rename to arch/arm/mach-orion/board-rd88f5182.c
index b7b0f52f4c0a..b763229dfcdf 100644
--- a/arch/arm/mach-orion5x/board-rd88f5182.c
+++ b/arch/arm/mach-orion/board-rd88f5182.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/rd88f5182-setup.c
- *
* Marvell Orion-NAS Reference Design Setup
*
* Maintainer: Ronen Shitrit <[email protected]>
@@ -18,7 +16,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
-#include "common.h"
+#include "orion5x-common.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c b/arch/arm/mach-orion/buffalo-wxl-setup.c
similarity index 97%
rename from arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
rename to arch/arm/mach-orion/buffalo-wxl-setup.c
index e112f2e7cc9a..72605a54becf 100644
--- a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
+++ b/arch/arm/mach-orion/buffalo-wxl-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
- *
* Buffalo WXL (Terastation Duo) Setup routines
*
* sebastien requiem <[email protected]>
@@ -20,8 +18,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include "mv78xx0.h"
-#include "common.h"
-#include "mpp.h"
+#include "mv78xx0-common.h"
+#include "mv78xx0-mpp.h"


/* This arch has 2 Giga Ethernet */
diff --git a/arch/arm/mach-dove/cm-a510.c b/arch/arm/mach-orion/cm-a510.c
similarity index 97%
rename from arch/arm/mach-dove/cm-a510.c
rename to arch/arm/mach-orion/cm-a510.c
index 9f25c993d863..3f1c03b3e0d4 100644
--- a/arch/arm/mach-dove/cm-a510.c
+++ b/arch/arm/mach-orion/cm-a510.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-dove/cm-a510.c
- *
* Copyright (C) 2010 CompuLab, Ltd.
* Konstantin Sinyuk <[email protected]>
*
@@ -23,7 +21,7 @@
#include <asm/mach/arch.h>

#include "dove.h"
-#include "common.h"
+#include "dove-common.h"

static struct mv643xx_eth_platform_data cm_a510_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT,
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/mach-orion/common.c
similarity index 99%
rename from arch/arm/plat-orion/common.c
rename to arch/arm/mach-orion/common.c
index 8647cb80a93b..7f5a649d2ba3 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/mach-orion/common.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/common.c
- *
* Marvell Orion SoC common setup code used by multiple mach-/common.c
*
* This file is licensed under the terms of the GNU General Public
@@ -21,7 +19,7 @@
#include <linux/platform_data/dsa.h>
#include <linux/platform_data/dma-mv_xor.h>
#include <linux/platform_data/usb-ehci-orion.h>
-#include <plat/common.h>
+#include "common.h"
#include <linux/phy.h>

/* Create a clkdev entry for a given device/clk */
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/mach-orion/common.h
similarity index 98%
rename from arch/arm/plat-orion/include/plat/common.h
rename to arch/arm/mach-orion/common.h
index 3647d3b33c20..66e5d3503a1d 100644
--- a/arch/arm/plat-orion/include/plat/common.h
+++ b/arch/arm/mach-orion/common.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/include/plat/common.h
- *
* Marvell Orion SoC common setup code used by different mach-/common.c
*
* This file is licensed under the terms of the GNU General Public
diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-orion/db78x00-bp-setup.c
similarity index 97%
rename from arch/arm/mach-mv78xx0/db78x00-bp-setup.c
rename to arch/arm/mach-orion/db78x00-bp-setup.c
index cf16e08d4cf5..b1c4870ab9ad 100644
--- a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
+++ b/arch/arm/mach-orion/db78x00-bp-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mv78xx0/db78x00-bp-setup.c
- *
* Marvell DB-78x00-BP Development Board Setup
*
* This file is licensed under the terms of the GNU General Public
@@ -18,7 +16,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include "mv78xx0.h"
-#include "common.h"
+#include "mv78xx0-common.h"

static struct mv643xx_eth_platform_data db78x00_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion/db88f5281-setup.c
similarity index 99%
rename from arch/arm/mach-orion5x/db88f5281-setup.c
rename to arch/arm/mach-orion/db88f5281-setup.c
index 39eae10ac8de..af97784a27f5 100644
--- a/arch/arm/mach-orion5x/db88f5281-setup.c
+++ b/arch/arm/mach-orion/db88f5281-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/db88f5281-setup.c
- *
* Marvell Orion-2 Development Board Setup
*
* Maintainer: Tzachi Perelstein <[email protected]>
@@ -24,8 +22,8 @@
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <linux/platform_data/mtd-orion_nand.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion/dns323-setup.c
similarity index 99%
rename from arch/arm/mach-orion5x/dns323-setup.c
rename to arch/arm/mach-orion/dns323-setup.c
index d13344b2ddcd..9c827f76ae75 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion/dns323-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/dns323-setup.c
- *
* Copyright (C) 2007 Herbert Valerio Riedel <[email protected]>
*
* Support for HW Rev C1:
@@ -33,10 +31,10 @@
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <asm/system_info.h>
-#include <plat/orion-gpio.h>
+#include "orion-gpio.h"
#include "orion5x.h"
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"

/* Rev A1 and B1 */
#define DNS323_GPIO_LED_RIGHT_AMBER 1
diff --git a/arch/arm/mach-dove/bridge-regs.h b/arch/arm/mach-orion/dove-bridge-regs.h
similarity index 100%
rename from arch/arm/mach-dove/bridge-regs.h
rename to arch/arm/mach-orion/dove-bridge-regs.h
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-orion/dove-common.c
similarity index 98%
rename from arch/arm/mach-dove/common.c
rename to arch/arm/mach-orion/dove-common.c
index 01b830afcea9..6946741c6c08 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-orion/dove-common.c
@@ -1,7 +1,4 @@
/*
- * arch/arm/mach-dove/common.c
- *
- * Core functions for Marvell Dove 88AP510 System On Chip
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
@@ -22,12 +19,12 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
-#include <plat/common.h>
-#include <plat/irq.h>
-#include <plat/time.h>
-#include "bridge-regs.h"
-#include "pm.h"
#include "common.h"
+#include "irq.h"
+#include "time.h"
+#include "dove-bridge-regs.h"
+#include "dove-pm.h"
+#include "dove-common.h"

/* These can go away once Dove uses the mvebu-mbus DT binding */
#define DOVE_MBUS_PCIE0_MEM_TARGET 0x4
diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-orion/dove-common.h
similarity index 97%
rename from arch/arm/mach-dove/common.h
rename to arch/arm/mach-orion/dove-common.h
index 1d725224d146..e79aac850f2a 100644
--- a/arch/arm/mach-dove/common.h
+++ b/arch/arm/mach-orion/dove-common.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-dove/common.h
- *
* Core functions for Marvell Dove 88AP510 System On Chip
*
* This file is licensed under the terms of the GNU General Public
diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-orion/dove-db-setup.c
similarity index 97%
rename from arch/arm/mach-dove/dove-db-setup.c
rename to arch/arm/mach-orion/dove-db-setup.c
index 418ab21b9d9b..e5c56c03c5f9 100644
--- a/arch/arm/mach-dove/dove-db-setup.c
+++ b/arch/arm/mach-orion/dove-db-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-dove/dove-db-setup.c
- *
* Marvell DB-MV88AP510-BP Development Board Setup
*
* This file is licensed under the terms of the GNU General Public
@@ -25,7 +23,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include "dove.h"
-#include "common.h"
+#include "dove-common.h"

static struct mv643xx_eth_platform_data dove_db_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT,
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-orion/dove-irq.c
similarity index 92%
rename from arch/arm/mach-dove/irq.c
rename to arch/arm/mach-orion/dove-irq.c
index 31ccbcee2627..052a88444fdb 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-orion/dove-irq.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-dove/irq.c
- *
* Dove IRQ handling.
*
* This file is licensed under the terms of the GNU General Public
@@ -12,12 +10,12 @@
#include <linux/io.h>
#include <asm/exception.h>

-#include <plat/irq.h>
-#include <plat/orion-gpio.h>
+#include "irq.h"
+#include "orion-gpio.h"

-#include "pm.h"
-#include "bridge-regs.h"
-#include "common.h"
+#include "dove-pm.h"
+#include "dove-bridge-regs.h"
+#include "dove-common.h"

static int __initdata gpio0_irqs[4] = {
IRQ_DOVE_GPIO_0_7,
diff --git a/arch/arm/mach-dove/irqs.h b/arch/arm/mach-orion/dove-irqs.h
similarity index 100%
rename from arch/arm/mach-dove/irqs.h
rename to arch/arm/mach-orion/dove-irqs.h
diff --git a/arch/arm/mach-dove/mpp.c b/arch/arm/mach-orion/dove-mpp.c
similarity index 97%
rename from arch/arm/mach-dove/mpp.c
rename to arch/arm/mach-orion/dove-mpp.c
index 6acd8488bb05..4b4f04e321c7 100644
--- a/arch/arm/mach-dove/mpp.c
+++ b/arch/arm/mach-orion/dove-mpp.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-dove/mpp.c
- *
* MPP functions for Marvell Dove SoCs
*
* This file is licensed under the terms of the GNU General Public
@@ -11,10 +9,10 @@
#include <linux/kernel.h>
#include <linux/gpio.h>
#include <linux/io.h>
-#include <plat/mpp.h>
-#include <plat/orion-gpio.h>
-#include "dove.h"
#include "mpp.h"
+#include "orion-gpio.h"
+#include "dove.h"
+#include "dove-mpp.h"

struct dove_mpp_grp {
int start;
diff --git a/arch/arm/mach-dove/mpp.h b/arch/arm/mach-orion/dove-mpp.h
similarity index 100%
rename from arch/arm/mach-dove/mpp.h
rename to arch/arm/mach-orion/dove-mpp.h
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-orion/dove-pcie.c
similarity index 97%
rename from arch/arm/mach-dove/pcie.c
rename to arch/arm/mach-orion/dove-pcie.c
index ee91ac6b5ebf..d3dbe0af6924 100644
--- a/arch/arm/mach-dove/pcie.c
+++ b/arch/arm/mach-orion/dove-pcie.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-dove/pcie.c
- *
* PCIe functions for Marvell Dove 88AP510 SoC
*
* This file is licensed under the terms of the GNU General Public
@@ -16,11 +14,11 @@
#include <asm/mach/arch.h>
#include <asm/setup.h>
#include <asm/delay.h>
-#include <plat/pcie.h>
-#include <plat/addr-map.h>
-#include "irqs.h"
-#include "bridge-regs.h"
-#include "common.h"
+#include "pcie.h"
+#include "addr-map.h"
+#include "dove-irqs.h"
+#include "dove-bridge-regs.h"
+#include "dove-common.h"

struct pcie_port {
u8 index;
diff --git a/arch/arm/mach-dove/pm.h b/arch/arm/mach-orion/dove-pm.h
similarity index 99%
rename from arch/arm/mach-dove/pm.h
rename to arch/arm/mach-orion/dove-pm.h
index 01267746d707..ce3521e1ef32 100644
--- a/arch/arm/mach-dove/pm.h
+++ b/arch/arm/mach-orion/dove-pm.h
@@ -8,7 +8,7 @@
#define __ASM_ARCH_PM_H

#include <asm/errno.h>
-#include "irqs.h"
+#include "dove-irqs.h"

#define CLOCK_GATING_CONTROL (DOVE_PMU_VIRT_BASE + 0x38)
#define CLOCK_GATING_BIT_USB0 0
diff --git a/arch/arm/mach-dove/dove.h b/arch/arm/mach-orion/dove.h
similarity index 99%
rename from arch/arm/mach-dove/dove.h
rename to arch/arm/mach-orion/dove.h
index 320ed1696abd..9c62704a5edd 100644
--- a/arch/arm/mach-dove/dove.h
+++ b/arch/arm/mach-orion/dove.h
@@ -9,7 +9,7 @@
#ifndef __ASM_ARCH_DOVE_H
#define __ASM_ARCH_DOVE_H

-#include "irqs.h"
+#include "dove-irqs.h"

/*
* Marvell Dove address maps.
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/mach-orion/gpio.c
similarity index 99%
rename from arch/arm/plat-orion/gpio.c
rename to arch/arm/mach-orion/gpio.c
index 26a531ebb6e9..8dc74e059fa2 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/mach-orion/gpio.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/gpio.c
- *
* Marvell Orion SoC GPIO handling.
*
* This file is licensed under the terms of the GNU General Public
@@ -23,7 +21,7 @@
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_address.h>
-#include <plat/orion-gpio.h>
+#include "orion-gpio.h"

/*
* GPIO unit register offsets.
diff --git a/arch/arm/plat-orion/irq.c b/arch/arm/mach-orion/irq.c
similarity index 92%
rename from arch/arm/plat-orion/irq.c
rename to arch/arm/mach-orion/irq.c
index 5b63b28b00ac..7015d34b6f5b 100644
--- a/arch/arm/plat-orion/irq.c
+++ b/arch/arm/mach-orion/irq.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/irq.c
- *
* Marvell Orion SoC IRQ handling.
*
* This file is licensed under the terms of the GNU General Public
@@ -16,8 +14,8 @@
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <asm/exception.h>
-#include <plat/irq.h>
-#include <plat/orion-gpio.h>
+#include "irq.h"
+#include "orion-gpio.h"

void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
{
diff --git a/arch/arm/plat-orion/include/plat/irq.h b/arch/arm/mach-orion/irq.h
similarity index 88%
rename from arch/arm/plat-orion/include/plat/irq.h
rename to arch/arm/mach-orion/irq.h
index 96be19e9bd93..892b95cfef47 100644
--- a/arch/arm/plat-orion/include/plat/irq.h
+++ b/arch/arm/mach-orion/irq.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/include/plat/irq.h
- *
* Marvell Orion SoC IRQ handling.
*
* This file is licensed under the terms of the GNU General Public
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion/kurobox_pro-setup.c
similarity index 99%
rename from arch/arm/mach-orion5x/kurobox_pro-setup.c
rename to arch/arm/mach-orion/kurobox_pro-setup.c
index 83d43cff4bd7..d936858b62f1 100644
--- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
+++ b/arch/arm/mach-orion/kurobox_pro-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/kurobox_pro-setup.c
- *
* Maintainer: Ronen Shitrit <[email protected]>
*
* This file is licensed under the terms of the GNU General Public
@@ -24,8 +22,8 @@
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <linux/platform_data/mtd-orion_nand.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion/ls_hgl-setup.c
similarity index 98%
rename from arch/arm/mach-orion5x/ls_hgl-setup.c
rename to arch/arm/mach-orion/ls_hgl-setup.c
index 47ba6e0502f5..cce7696bd17a 100644
--- a/arch/arm/mach-orion5x/ls_hgl-setup.c
+++ b/arch/arm/mach-orion/ls_hgl-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/ls_hgl-setup.c
- *
* Maintainer: Zhu Qingsen <[email protected]>
*
* This file is licensed under the terms of the GNU General Public
@@ -21,8 +19,8 @@
#include <linux/gpio.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/plat-orion/mpp.c b/arch/arm/mach-orion/mpp.c
similarity index 95%
rename from arch/arm/plat-orion/mpp.c
rename to arch/arm/mach-orion/mpp.c
index 8a6880d528b6..d0736f22c824 100644
--- a/arch/arm/plat-orion/mpp.c
+++ b/arch/arm/mach-orion/mpp.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/mpp.c
- *
* MPP functions for Marvell orion SoCs
*
* This file is licensed under the terms of the GNU General Public
@@ -13,8 +11,8 @@
#include <linux/mbus.h>
#include <linux/io.h>
#include <linux/gpio.h>
-#include <plat/orion-gpio.h>
-#include <plat/mpp.h>
+#include "orion-gpio.h"
+#include "mpp.h"

/* Address of the ith MPP control register */
static __init void __iomem *mpp_ctrl_addr(unsigned int i,
diff --git a/arch/arm/plat-orion/include/plat/mpp.h b/arch/arm/mach-orion/mpp.h
similarity index 95%
rename from arch/arm/plat-orion/include/plat/mpp.h
rename to arch/arm/mach-orion/mpp.h
index 254552fee889..8100c82a2fa6 100644
--- a/arch/arm/plat-orion/include/plat/mpp.h
+++ b/arch/arm/mach-orion/mpp.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/include/plat/mpp.h
- *
* Marvell Orion SoC MPP handling.
*
* This file is licensed under the terms of the GNU General Public
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion/mv2120-setup.c
similarity index 99%
rename from arch/arm/mach-orion5x/mv2120-setup.c
rename to arch/arm/mach-orion/mv2120-setup.c
index 2bf8ec75e908..9f001118e454 100644
--- a/arch/arm/mach-orion5x/mv2120-setup.c
+++ b/arch/arm/mach-orion/mv2120-setup.c
@@ -21,8 +21,8 @@
#include <linux/ata_platform.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"

#define MV2120_NOR_BOOT_BASE 0xf4000000
diff --git a/arch/arm/mach-mv78xx0/bridge-regs.h b/arch/arm/mach-orion/mv78xx0-bridge-regs.h
similarity index 100%
rename from arch/arm/mach-mv78xx0/bridge-regs.h
rename to arch/arm/mach-orion/mv78xx0-bridge-regs.h
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-orion/mv78xx0-common.c
similarity index 98%
rename from arch/arm/mach-mv78xx0/common.c
rename to arch/arm/mach-orion/mv78xx0-common.c
index dd762d1b083f..b049b99527b7 100644
--- a/arch/arm/mach-mv78xx0/common.c
+++ b/arch/arm/mach-orion/mv78xx0-common.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mv78xx0/common.c
- *
* Core functions for Marvell MV78xx0 SoCs
*
* This file is licensed under the terms of the GNU General Public
@@ -21,12 +19,12 @@
#include <asm/mach/time.h>
#include <linux/platform_data/usb-ehci-orion.h>
#include <linux/platform_data/mtd-orion_nand.h>
-#include <plat/time.h>
-#include <plat/common.h>
-#include <plat/addr-map.h>
-#include "mv78xx0.h"
-#include "bridge-regs.h"
+#include "time.h"
#include "common.h"
+#include "addr-map.h"
+#include "mv78xx0.h"
+#include "mv78xx0-bridge-regs.h"
+#include "mv78xx0-common.h"

static int get_tclk(void);

diff --git a/arch/arm/mach-mv78xx0/common.h b/arch/arm/mach-orion/mv78xx0-common.h
similarity index 97%
rename from arch/arm/mach-mv78xx0/common.h
rename to arch/arm/mach-orion/mv78xx0-common.h
index 6889af26077d..91164ef16030 100644
--- a/arch/arm/mach-mv78xx0/common.h
+++ b/arch/arm/mach-orion/mv78xx0-common.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mv78xx0/common.h
- *
* Core functions for Marvell MV78xx0 SoCs
*
* This file is licensed under the terms of the GNU General Public
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-orion/mv78xx0-irq.c
similarity index 93%
rename from arch/arm/mach-mv78xx0/irq.c
rename to arch/arm/mach-orion/mv78xx0-irq.c
index 788569e960e1..e5a42c6fc7bf 100644
--- a/arch/arm/mach-mv78xx0/irq.c
+++ b/arch/arm/mach-orion/mv78xx0-irq.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mv78xx0/irq.c
- *
* MV78xx0 IRQ handling.
*
* This file is licensed under the terms of the GNU General Public
@@ -12,10 +10,10 @@
#include <linux/irq.h>
#include <linux/io.h>
#include <asm/exception.h>
-#include <plat/orion-gpio.h>
-#include <plat/irq.h>
-#include "bridge-regs.h"
-#include "common.h"
+#include "orion-gpio.h"
+#include "irq.h"
+#include "mv78xx0-bridge-regs.h"
+#include "mv78xx0-common.h"

static int __initdata gpio0_irqs[4] = {
IRQ_MV78XX0_GPIO_0_7,
diff --git a/arch/arm/mach-mv78xx0/irqs.h b/arch/arm/mach-orion/mv78xx0-irqs.h
similarity index 100%
rename from arch/arm/mach-mv78xx0/irqs.h
rename to arch/arm/mach-orion/mv78xx0-irqs.h
diff --git a/arch/arm/mach-mv78xx0/mpp.c b/arch/arm/mach-orion/mv78xx0-mpp.c
similarity index 91%
rename from arch/arm/mach-mv78xx0/mpp.c
rename to arch/arm/mach-orion/mv78xx0-mpp.c
index 72843c02e95a..2616b656d5f5 100644
--- a/arch/arm/mach-mv78xx0/mpp.c
+++ b/arch/arm/mach-orion/mv78xx0-mpp.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mv78x00/mpp.c
- *
* MPP functions for Marvell MV78x00 SoCs
*
* This file is licensed under the terms of the GNU General Public
@@ -11,10 +9,10 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
-#include <plat/mpp.h>
-#include "mv78xx0.h"
-#include "common.h"
#include "mpp.h"
+#include "mv78xx0.h"
+#include "mv78xx0-common.h"
+#include "mv78xx0-mpp.h"

static unsigned int __init mv78xx0_variant(void)
{
diff --git a/arch/arm/mach-mv78xx0/mpp.h b/arch/arm/mach-orion/mv78xx0-mpp.h
similarity index 99%
rename from arch/arm/mach-mv78xx0/mpp.h
rename to arch/arm/mach-orion/mv78xx0-mpp.h
index 3752302ae2ee..004f22d39c98 100644
--- a/arch/arm/mach-mv78xx0/mpp.h
+++ b/arch/arm/mach-orion/mv78xx0-mpp.h
@@ -1,6 +1,5 @@
/*
- * linux/arch/arm/mach-mv78xx0/mpp.h -- Multi Purpose Pins
- *
+ * Multi Purpose Pins
*
* sebastien requiem <[email protected]>
*
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-orion/mv78xx0-pcie.c
similarity index 98%
rename from arch/arm/mach-mv78xx0/pcie.c
rename to arch/arm/mach-orion/mv78xx0-pcie.c
index 636d84b40466..d852ec563879 100644
--- a/arch/arm/mach-mv78xx0/pcie.c
+++ b/arch/arm/mach-orion/mv78xx0-pcie.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mv78xx0/pcie.c
- *
* PCIe functions for Marvell MV78xx0 SoCs
*
* This file is licensed under the terms of the GNU General Public
@@ -14,9 +12,9 @@
#include <video/vga.h>
#include <asm/irq.h>
#include <asm/mach/pci.h>
-#include <plat/pcie.h>
+#include "pcie.h"
#include "mv78xx0.h"
-#include "common.h"
+#include "mv78xx0-common.h"

#define MV78XX0_MBUS_PCIE_MEM_TARGET(port, lane) ((port) ? 8 : 4)
#define MV78XX0_MBUS_PCIE_MEM_ATTR(port, lane) (0xf8 & ~(0x10 << (lane)))
diff --git a/arch/arm/mach-mv78xx0/mv78xx0.h b/arch/arm/mach-orion/mv78xx0.h
similarity index 99%
rename from arch/arm/mach-mv78xx0/mv78xx0.h
rename to arch/arm/mach-orion/mv78xx0.h
index c1a9a1d1b295..e24dc03c2742 100644
--- a/arch/arm/mach-mv78xx0/mv78xx0.h
+++ b/arch/arm/mach-orion/mv78xx0.h
@@ -10,7 +10,7 @@
#ifndef __ASM_ARCH_MV78XX0_H
#define __ASM_ARCH_MV78XX0_H

-#include "irqs.h"
+#include "mv78xx0-irqs.h"

/*
* Marvell MV78xx0 address maps.
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion/net2big-setup.c
similarity index 99%
rename from arch/arm/mach-orion5x/net2big-setup.c
rename to arch/arm/mach-orion/net2big-setup.c
index bf6be4cfd238..46eef09a0bad 100644
--- a/arch/arm/mach-orion5x/net2big-setup.c
+++ b/arch/arm/mach-orion/net2big-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/net2big-setup.c
- *
* LaCie 2Big Network NAS setup
*
* Copyright (C) 2009 Simon Guinot <[email protected]>
@@ -24,9 +22,9 @@
#include <linux/delay.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
-#include <plat/orion-gpio.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion-gpio.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/plat-orion/include/plat/orion-gpio.h b/arch/arm/mach-orion/orion-gpio.h
similarity index 94%
rename from arch/arm/plat-orion/include/plat/orion-gpio.h
rename to arch/arm/mach-orion/orion-gpio.h
index e856b073a9c8..5df030e391c9 100644
--- a/arch/arm/plat-orion/include/plat/orion-gpio.h
+++ b/arch/arm/mach-orion/orion-gpio.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/include/plat/orion-gpio.h
- *
* Marvell Orion SoC GPIO handling.
*
* This file is licensed under the terms of the GNU General Public
diff --git a/arch/arm/mach-orion5x/bridge-regs.h b/arch/arm/mach-orion/orion5x-bridge-regs.h
similarity index 100%
rename from arch/arm/mach-orion5x/bridge-regs.h
rename to arch/arm/mach-orion/orion5x-bridge-regs.h
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion/orion5x-common.h
similarity index 100%
rename from arch/arm/mach-orion5x/common.h
rename to arch/arm/mach-orion/orion5x-common.h
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion/orion5x-irq.c
similarity index 89%
rename from arch/arm/mach-orion5x/irq.c
rename to arch/arm/mach-orion/orion5x-irq.c
index ac4af2283bef..51ddf89dca00 100644
--- a/arch/arm/mach-orion5x/irq.c
+++ b/arch/arm/mach-orion/orion5x-irq.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/irq.c
- *
* Core IRQ functions for Marvell Orion System On Chip
*
* Maintainer: Tzachi Perelstein <[email protected]>
@@ -13,11 +11,11 @@
#include <linux/kernel.h>
#include <linux/irq.h>
#include <linux/io.h>
-#include <plat/orion-gpio.h>
-#include <plat/irq.h>
+#include "orion-gpio.h"
+#include "irq.h"
#include <asm/exception.h>
-#include "bridge-regs.h"
-#include "common.h"
+#include "orion5x-bridge-regs.h"
+#include "orion5x-common.h"

static int __initdata gpio0_irqs[4] = {
IRQ_ORION5X_GPIO_0_7,
diff --git a/arch/arm/mach-orion5x/irqs.h b/arch/arm/mach-orion/orion5x-irqs.h
similarity index 100%
rename from arch/arm/mach-orion5x/irqs.h
rename to arch/arm/mach-orion/orion5x-irqs.h
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion/orion5x-mpp.c
similarity index 92%
rename from arch/arm/mach-orion5x/mpp.c
rename to arch/arm/mach-orion/orion5x-mpp.c
index 19ef18594415..512090fda50c 100644
--- a/arch/arm/mach-orion5x/mpp.c
+++ b/arch/arm/mach-orion/orion5x-mpp.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/mpp.c
- *
* MPP functions for Marvell Orion 5x SoCs
*
* This file is licensed under the terms of the GNU General Public
@@ -11,10 +9,10 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
-#include <plat/mpp.h>
-#include "orion5x.h"
#include "mpp.h"
-#include "common.h"
+#include "orion5x.h"
+#include "orion5x-mpp.h"
+#include "orion5x-common.h"

static unsigned int __init orion5x_variant(void)
{
diff --git a/arch/arm/mach-orion5x/mpp.h b/arch/arm/mach-orion/orion5x-mpp.h
similarity index 100%
rename from arch/arm/mach-orion5x/mpp.h
rename to arch/arm/mach-orion/orion5x-mpp.h
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion/orion5x-pci.c
similarity index 99%
rename from arch/arm/mach-orion5x/pci.c
rename to arch/arm/mach-orion/orion5x-pci.c
index 76951bfbacf5..cf7ed019b509 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion/orion5x-pci.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/pci.c
- *
* PCI and PCIe functions for Marvell Orion System On Chip
*
* Maintainer: Tzachi Perelstein <[email protected]>
@@ -17,9 +15,9 @@
#include <video/vga.h>
#include <asm/irq.h>
#include <asm/mach/pci.h>
-#include <plat/pcie.h>
-#include <plat/addr-map.h>
-#include "common.h"
+#include "pcie.h"
+#include "addr-map.h"
+#include "orion5x-common.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion/orion5x.c
similarity index 99%
rename from arch/arm/mach-orion5x/common.c
rename to arch/arm/mach-orion/orion5x.c
index 7bcb41137bbf..d653c1713582 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion/orion5x.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/common.c
- *
* Core functions for Marvell Orion 5x SoCs
*
* Maintainer: Tzachi Perelstein <[email protected]>
@@ -30,11 +28,11 @@
#include <asm/mach/time.h>
#include <linux/platform_data/mtd-orion_nand.h>
#include <linux/platform_data/usb-ehci-orion.h>
-#include <plat/time.h>
-#include <plat/common.h>
-
-#include "bridge-regs.h"
+#include "time.h"
#include "common.h"
+
+#include "orion5x-bridge-regs.h"
+#include "orion5x-common.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/orion5x.h b/arch/arm/mach-orion/orion5x.h
similarity index 99%
rename from arch/arm/mach-orion5x/orion5x.h
rename to arch/arm/mach-orion/orion5x.h
index 2b66120fba86..8eb42e7d6d14 100644
--- a/arch/arm/mach-orion5x/orion5x.h
+++ b/arch/arm/mach-orion/orion5x.h
@@ -12,7 +12,7 @@
#ifndef __ASM_ARCH_ORION5X_H
#define __ASM_ARCH_ORION5X_H

-#include "irqs.h"
+#include "orion5x-irqs.h"

/*****************************************************************************
* Orion Address Maps
diff --git a/arch/arm/plat-orion/pcie.c b/arch/arm/mach-orion/pcie.c
similarity index 98%
rename from arch/arm/plat-orion/pcie.c
rename to arch/arm/mach-orion/pcie.c
index 8b8c06d2e9c4..f5dd78160a81 100644
--- a/arch/arm/plat-orion/pcie.c
+++ b/arch/arm/mach-orion/pcie.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/pcie.c
- *
* Marvell Orion SoC PCIe handling.
*
* This file is licensed under the terms of the GNU General Public
@@ -12,8 +10,8 @@
#include <linux/pci.h>
#include <linux/mbus.h>
#include <asm/mach/pci.h>
-#include <plat/pcie.h>
-#include <plat/addr-map.h>
+#include "pcie.h"
+#include "addr-map.h"
#include <linux/delay.h>

/*
diff --git a/arch/arm/plat-orion/include/plat/pcie.h b/arch/arm/mach-orion/pcie.h
similarity index 96%
rename from arch/arm/plat-orion/include/plat/pcie.h
rename to arch/arm/mach-orion/pcie.h
index fe5b9e862747..d3dd6f2119c5 100644
--- a/arch/arm/plat-orion/include/plat/pcie.h
+++ b/arch/arm/mach-orion/pcie.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/include/plat/pcie.h
- *
* Marvell Orion SoC PCIe handling.
*
* This file is licensed under the terms of the GNU General Public
diff --git a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c b/arch/arm/mach-orion/rd78x00-masa-setup.c
similarity index 96%
rename from arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
rename to arch/arm/mach-orion/rd78x00-masa-setup.c
index 308ab71ec822..9405bfe5da61 100644
--- a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
+++ b/arch/arm/mach-orion/rd78x00-masa-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-mv78x00/rd78x00-masa-setup.c
- *
* Marvell RD-78x00-mASA Development Board Setup
*
* This file is licensed under the terms of the GNU General Public
@@ -17,7 +15,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include "mv78xx0.h"
-#include "common.h"
+#include "mv78xx0-common.h"

static struct mv643xx_eth_platform_data rd78x00_masa_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion/rd88f5181l-fxo-setup.c
similarity index 98%
rename from arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
rename to arch/arm/mach-orion/rd88f5181l-fxo-setup.c
index c65ab7db36ad..3077fc122acc 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
+++ b/arch/arm/mach-orion/rd88f5181l-fxo-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
- *
* Marvell Orion-VoIP FXO Reference Design Setup
*
* This file is licensed under the terms of the GNU General Public
@@ -20,8 +18,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion/rd88f5181l-ge-setup.c
similarity index 98%
rename from arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
rename to arch/arm/mach-orion/rd88f5181l-ge-setup.c
index 76b8138d9d79..38e5db3cef5c 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
+++ b/arch/arm/mach-orion/rd88f5181l-ge-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
- *
* Marvell Orion-VoIP GE Reference Design Setup
*
* This file is licensed under the terms of the GNU General Public
@@ -21,8 +19,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion/rd88f5182-setup.c
similarity index 98%
rename from arch/arm/mach-orion5x/rd88f5182-setup.c
rename to arch/arm/mach-orion/rd88f5182-setup.c
index fe3e67c81fb8..057df4f76299 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion/rd88f5182-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/rd88f5182-setup.c
- *
* Marvell Orion-NAS Reference Design Setup
*
* Maintainer: Ronen Shitrit <[email protected]>
@@ -23,8 +21,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion/rd88f6183ap-ge-setup.c
similarity index 97%
rename from arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
rename to arch/arm/mach-orion/rd88f6183ap-ge-setup.c
index 5f388a1ed1e4..d9a2dc4ff8be 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion/rd88f6183ap-ge-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/rd88f6183-ap-ge-setup.c
- *
* Marvell Orion-1-90 AP GE Reference Design Setup
*
* This file is licensed under the terms of the GNU General Public
@@ -22,7 +20,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
-#include "common.h"
+#include "orion5x-common.h"
#include "orion5x.h"

static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = {
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion/terastation_pro2-setup.c
similarity index 99%
rename from arch/arm/mach-orion5x/terastation_pro2-setup.c
rename to arch/arm/mach-orion/terastation_pro2-setup.c
index 23a5521c6833..6f1e5a6f22bb 100644
--- a/arch/arm/mach-orion5x/terastation_pro2-setup.c
+++ b/arch/arm/mach-orion/terastation_pro2-setup.c
@@ -18,8 +18,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"

/*****************************************************************************
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/mach-orion/time.c
similarity index 99%
rename from arch/arm/plat-orion/time.c
rename to arch/arm/mach-orion/time.c
index ffb93db68e9c..ce6da19a3534 100644
--- a/arch/arm/plat-orion/time.c
+++ b/arch/arm/mach-orion/time.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/time.c
- *
* Marvell Orion SoC timer handling.
*
* This file is licensed under the terms of the GNU General Public
@@ -17,7 +15,7 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/sched_clock.h>
-#include <plat/time.h>
+#include "time.h"
#include <asm/delay.h>

/*
diff --git a/arch/arm/plat-orion/include/plat/time.h b/arch/arm/mach-orion/time.h
similarity index 90%
rename from arch/arm/plat-orion/include/plat/time.h
rename to arch/arm/mach-orion/time.h
index 07527e417c62..415cfa052b2d 100644
--- a/arch/arm/plat-orion/include/plat/time.h
+++ b/arch/arm/mach-orion/time.h
@@ -1,6 +1,4 @@
/*
- * arch/arm/plat-orion/include/plat/time.h
- *
* Marvell Orion SoC time handling.
*
* This file is licensed under the terms of the GNU General Public
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion/ts209-setup.c
similarity index 99%
rename from arch/arm/mach-orion5x/ts209-setup.c
rename to arch/arm/mach-orion/ts209-setup.c
index bab8ba0e01ab..a77f3dcb3aa7 100644
--- a/arch/arm/mach-orion5x/ts209-setup.c
+++ b/arch/arm/mach-orion/ts209-setup.c
@@ -21,8 +21,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"
#include "tsx09-common.h"

diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion/ts409-setup.c
similarity index 99%
rename from arch/arm/mach-orion5x/ts409-setup.c
rename to arch/arm/mach-orion/ts409-setup.c
index 6f60dc1dfa22..4e4b416cfa52 100644
--- a/arch/arm/mach-orion5x/ts409-setup.c
+++ b/arch/arm/mach-orion/ts409-setup.c
@@ -23,8 +23,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"
#include "tsx09-common.h"

diff --git a/arch/arm/mach-orion5x/ts78xx-fpga.h b/arch/arm/mach-orion/ts78xx-fpga.h
similarity index 100%
rename from arch/arm/mach-orion5x/ts78xx-fpga.h
rename to arch/arm/mach-orion/ts78xx-fpga.h
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion/ts78xx-setup.c
similarity index 99%
rename from arch/arm/mach-orion5x/ts78xx-setup.c
rename to arch/arm/mach-orion/ts78xx-setup.c
index fda9b75c3a33..6f67d03f0be3 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion/ts78xx-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/ts78xx-setup.c
- *
* Maintainer: Alexander Clouter <[email protected]>
*
* This file is licensed under the terms of the GNU General Public
@@ -21,8 +19,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"
#include "orion5x.h"
#include "ts78xx-fpga.h"

diff --git a/arch/arm/mach-orion5x/tsx09-common.c b/arch/arm/mach-orion/tsx09-common.c
similarity index 97%
rename from arch/arm/mach-orion5x/tsx09-common.c
rename to arch/arm/mach-orion/tsx09-common.c
index 099e6fdfa8e6..6ac62f58c160 100644
--- a/arch/arm/mach-orion5x/tsx09-common.c
+++ b/arch/arm/mach-orion/tsx09-common.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * QNAP TS-x09 Boards common functions
- *
* Maintainers: Lennert Buytenhek <[email protected]>
* Byron Bradley <[email protected]>
*/
@@ -13,7 +11,7 @@
#include <linux/serial_reg.h>
#include "orion5x.h"
#include "tsx09-common.h"
-#include "common.h"
+#include "orion5x-common.h"

/*****************************************************************************
* QNAP TS-x09 specific power off method via UART1-attached PIC
diff --git a/arch/arm/mach-orion5x/tsx09-common.h b/arch/arm/mach-orion/tsx09-common.h
similarity index 100%
rename from arch/arm/mach-orion5x/tsx09-common.h
rename to arch/arm/mach-orion/tsx09-common.h
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion/wnr854t-setup.c
similarity index 98%
rename from arch/arm/mach-orion5x/wnr854t-setup.c
rename to arch/arm/mach-orion/wnr854t-setup.c
index 83589a28a491..382ac84e82a8 100644
--- a/arch/arm/mach-orion5x/wnr854t-setup.c
+++ b/arch/arm/mach-orion/wnr854t-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/wnr854t-setup.c
- *
* 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.
@@ -20,8 +18,8 @@
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include "orion5x.h"
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"

static unsigned int wnr854t_mpp_modes[] __initdata = {
MPP0_GPIO, /* Power LED green (0=on) */
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion/wrt350n-v2-setup.c
similarity index 98%
rename from arch/arm/mach-orion5x/wrt350n-v2-setup.c
rename to arch/arm/mach-orion/wrt350n-v2-setup.c
index cea08d4a2597..db8abe6be6c9 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion/wrt350n-v2-setup.c
@@ -1,6 +1,4 @@
/*
- * arch/arm/mach-orion5x/wrt350n-v2-setup.c
- *
* 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.
@@ -23,8 +21,8 @@
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include "orion5x.h"
-#include "common.h"
-#include "mpp.h"
+#include "orion5x-common.h"
+#include "orion5x-mpp.h"

/*
* LEDs attached to GPIO
--
2.20.0

2019-10-19 09:11:03

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 6/6] ARM: orion: unify Makefile/Kconfig files

On Fri, Oct 18, 2019 at 9:01 PM Andrew Lunn <[email protected]> wrote:
>
> On Fri, Oct 18, 2019 at 06:29:19PM +0200, Arnd Bergmann wrote:
> > +config MACH_TERASTATION_WXL
> > + bool "Buffalo WLX (Terastation Duo) NAS"
> > + help
> > + Say 'Y' here if you want your kernel to support the
> > + Buffalo WXL Nas.
> > +
> > +endif
> > +
> > +# SPDX-License-Identifier: GPL-2.0-only
> > +menuconfig ARCH_ORION5X
> > + bool "Marvell Orion"
> > + depends on MMU && ARCH_MULTI_V5
> > + select CPU_FEROCEON
> > + select GENERIC_CLOCKEVENTS
> > + select FORCE_PCI
> > + select PHYLIB if NETDEVICES
> > + select PLAT_ORION_LEGACY
> > + help
> > + Support for the following Marvell Orion 5x series SoCs:
> > + Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
> > + Orion-2 (5281), Orion-1-90 (6183).
>
> Hi Arnd
>
> I don't think this SPDX line should be in the middle of the file?

Fixed now, thanks!

Arnd

2019-10-19 09:11:42

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 6/6] ARM: orion: unify Makefile/Kconfig files

On Fri, Oct 18, 2019 at 06:29:19PM +0200, Arnd Bergmann wrote:
> +config MACH_TERASTATION_WXL
> + bool "Buffalo WLX (Terastation Duo) NAS"
> + help
> + Say 'Y' here if you want your kernel to support the
> + Buffalo WXL Nas.
> +
> +endif
> +
> +# SPDX-License-Identifier: GPL-2.0-only
> +menuconfig ARCH_ORION5X
> + bool "Marvell Orion"
> + depends on MMU && ARCH_MULTI_V5
> + select CPU_FEROCEON
> + select GENERIC_CLOCKEVENTS
> + select FORCE_PCI
> + select PHYLIB if NETDEVICES
> + select PLAT_ORION_LEGACY
> + help
> + Support for the following Marvell Orion 5x series SoCs:
> + Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
> + Orion-2 (5281), Orion-1-90 (6183).

Hi Arnd

I don't think this SPDX line should be in the middle of the file?

Andrew

2019-10-19 16:46:26

by Alexander Sverdlin

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

Hello Arnd,

On Fri, 18 Oct 2019 18:29:15 +0200
Arnd Bergmann <[email protected]> wrote:

> Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
> globally. Do the minimal conversion by setting .nr_irqs in each
> machine descriptor.
>
> Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
> .nr_irqs the original value there, while using the plain NR_EP93XX_IRQS
> everywhere else.

This patch causes multiple problems on EDB9302:

1. WARNINGs during gpiochip registration, for instance:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at kernel/irq/chip.c:1013 __irq_do_set_handler+0x94/0x188
CPU: 0 PID: 1 Comm: swapper Tainted: G W 5.4.0-rc3 #1
Hardware name: Cirrus Logic EDB9302 Evaluation Board
[<c000e878>] (unwind_backtrace) from [<c000d574>] (show_stack+0x10/0x18)
[<c000d574>] (show_stack) from [<c0335e28>] (dump_stack+0x18/0x24)
[<c0335e28>] (dump_stack) from [<c001cf1c>] (__warn+0xa4/0xc8)
[<c001cf1c>] (__warn) from [<c001cfe8>] (warn_slowpath_fmt+0xa8/0xb8)
[<c001cfe8>] (warn_slowpath_fmt) from [<c0055668>] (__irq_do_set_handler+0x94/0x188)
[<c0055668>] (__irq_do_set_handler) from [<c005647c>] (irq_set_chained_handler_and_data+0x48/0x7c)
[<c005647c>] (irq_set_chained_handler_and_data) from [<c01ab440>] (gpiochip_add_data_with_key+0x6d4/0xabc)
[<c01ab440>] (gpiochip_add_data_with_key) from [<c01ab868>] (devm_gpiochip_add_data+0x40/0x88)
[<c01ab868>] (devm_gpiochip_add_data) from [<c01ae554>] (ep93xx_gpio_probe+0x1ac/0x280)
[<c01ae554>] (ep93xx_gpio_probe) from [<c01e0f34>] (platform_drv_probe+0x28/0x6c)
[<c01e0f34>] (platform_drv_probe) from [<c01df588>] (really_probe+0x1c8/0x340)
[<c01df588>] (really_probe) from [<c01ddfe4>] (bus_for_each_drv+0x58/0xc0)
[<c01ddfe4>] (bus_for_each_drv) from [<c01df904>] (__device_attach+0xb4/0x104)
[<c01df904>] (__device_attach) from [<c01de1d4>] (bus_probe_device+0x8c/0x94)
[<c01de1d4>] (bus_probe_device) from [<c01db5e4>] (device_add+0x3d0/0x59c)
[<c01db5e4>] (device_add) from [<c01e16d8>] (platform_device_add+0x100/0x20c)
[<c01e16d8>] (platform_device_add) from [<c03f50b0>] (ep93xx_init_devices+0x16c/0x20c)
[<c03f50b0>] (ep93xx_init_devices) from [<c03f53a0>] (edb93xx_init_machine+0xc/0x84)
[<c03f53a0>] (edb93xx_init_machine) from [<c03f1984>] (customize_machine+0x20/0x38)
[<c03f1984>] (customize_machine) from [<c03f0e54>] (do_one_initcall+0x78/0x1a0)
[<c03f0e54>] (do_one_initcall) from [<c03f1080>] (kernel_init_freeable+0x104/0x1b8)
[<c03f1080>] (kernel_init_freeable) from [<c034c358>] (kernel_init+0x8/0xf8)
[<c034c358>] (kernel_init) from [<c00090d0>] (ret_from_fork+0x14/0x24)
Exception stack(0xc4433fb0 to 0xc4433ff8)
3fa0: 00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end trace 8f9e35e2d6224882 ]---

2. Broken sound (I2S), this looks like below in the log:

ep93xx-i2s ep93xx-i2s: Missing dma channel for stream: 0
CS4271: ASoC: pcm constructor failed: -22
edb93xx-audio edb93xx-audio: ASoC: can't create pcm CS4271 HiFi :-22

And /proc/interrupts has two entries less. Without patch:

# cat /proc/interrupts
CPU0
7: 0 VIC 7 Edge i2s-pcm-out
8: 0 VIC 8 Edge i2s-pcm-in
39: 2 VIC 7 Edge eth0
51: 7532 VIC 19 Edge ep93xx timer
52: 144 VIC 20 Edge uart-pl010
53: 4 VIC 21 Edge ep93xx-spi
60: 0 VIC 28 Edge ep93xx-i2s
Err: 0

With patch:

# cat /proc/interrupts
CPU0
39: 146 VIC 7 Edge eth0
51: 162161 VIC 19 Edge ep93xx timer
52: 139 VIC 20 Edge uart-pl010
53: 4 VIC 21 Edge ep93xx-spi
60: 0 VIC 28 Edge ep93xx-i2s
Err: 0

I will try to look into I2S problem...

> ---
> It's been a while since I did this, no idea what else is needed
> here or if this is correct at all.
>
> Cc: Hartley Sweeten <[email protected]>
> Cc: Alexander Sverdlin <[email protected]>
> Cc: Hubert Feurstein <[email protected]>
> Cc: Lukasz Majewski <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> arch/arm/Kconfig | 2 ++
> arch/arm/mach-ep93xx/adssphere.c | 1 +
> arch/arm/mach-ep93xx/edb93xx.c | 8 ++++++++
> arch/arm/mach-ep93xx/gesbc9312.c | 1 +
> arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 -------
> 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 | 1 +
> arch/arm/mach-ep93xx/ts72xx.c | 3 ++-
> arch/arm/mach-ep93xx/vision_ep9307.c | 1 +
> 11 files changed, 22 insertions(+), 8 deletions(-)
> rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (94%)

--
Alexander Sverdlin.

2019-10-19 20:09:39

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

On Sat, Oct 19, 2019 at 6:43 PM Alexander Sverdlin
<[email protected]> wrote:
> On Fri, 18 Oct 2019 18:29:15 +0200
> Arnd Bergmann <[email protected]> wrote:
>
> > Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
> > globally. Do the minimal conversion by setting .nr_irqs in each
> > machine descriptor.
> >
> > Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
> > .nr_irqs the original value there, while using the plain NR_EP93XX_IRQS
> > everywhere else.
>
> This patch causes multiple problems on EDB9302:
>
> 1. WARNINGs during gpiochip registration, for instance:
>
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 1 at kernel/irq/chip.c:1013 __irq_do_set_handler+0x94/0x188
> CPU: 0 PID: 1 Comm: swapper Tainted: G W 5.4.0-rc3 #1
> Hardware name: Cirrus Logic EDB9302 Evaluation Board
> [<c000e878>] (unwind_backtrace) from [<c000d574>] (show_stack+0x10/0x18)
> [<c000d574>] (show_stack) from [<c0335e28>] (dump_stack+0x18/0x24)
> [<c0335e28>] (dump_stack) from [<c001cf1c>] (__warn+0xa4/0xc8)
> [<c001cf1c>] (__warn) from [<c001cfe8>] (warn_slowpath_fmt+0xa8/0xb8)
> [<c001cfe8>] (warn_slowpath_fmt) from [<c0055668>] (__irq_do_set_handler+0x94/0x188)
> [<c0055668>] (__irq_do_set_handler) from [<c005647c>] (irq_set_chained_handler_and_data+0x48/0x7c)
> [<c005647c>] (irq_set_chained_handler_and_data) from [<c01ab440>] (gpiochip_add_data_with_key+0x6d4/0xabc)
> [<c01ab440>] (gpiochip_add_data_with_key) from [<c01ab868>] (devm_gpiochip_add_data+0x40/0x88)
> [<c01ab868>] (devm_gpiochip_add_data) from [<c01ae554>] (ep93xx_gpio_probe+0x1ac/0x280)
> [<c01ae554>] (ep93xx_gpio_probe) from [<c01e0f34>] (platform_drv_probe+0x28/0x6c)
> [<c01e0f34>] (platform_drv_probe) from [<c01df588>] (really_probe+0x1c8/0x340)
> [<c01df588>] (really_probe) from [<c01ddfe4>] (bus_for_each_drv+0x58/0xc0)
> [<c01ddfe4>] (bus_for_each_drv) from [<c01df904>] (__device_attach+0xb4/0x104)
> [<c01df904>] (__device_attach) from [<c01de1d4>] (bus_probe_device+0x8c/0x94)
> [<c01de1d4>] (bus_probe_device) from [<c01db5e4>] (device_add+0x3d0/0x59c)
> [<c01db5e4>] (device_add) from [<c01e16d8>] (platform_device_add+0x100/0x20c)
> [<c01e16d8>] (platform_device_add) from [<c03f50b0>] (ep93xx_init_devices+0x16c/0x20c)
> [<c03f50b0>] (ep93xx_init_devices) from [<c03f53a0>] (edb93xx_init_machine+0xc/0x84)
> [<c03f53a0>] (edb93xx_init_machine) from [<c03f1984>] (customize_machine+0x20/0x38)
> [<c03f1984>] (customize_machine) from [<c03f0e54>] (do_one_initcall+0x78/0x1a0)
> [<c03f0e54>] (do_one_initcall) from [<c03f1080>] (kernel_init_freeable+0x104/0x1b8)
> [<c03f1080>] (kernel_init_freeable) from [<c034c358>] (kernel_init+0x8/0xf8)
> [<c034c358>] (kernel_init) from [<c00090d0>] (ret_from_fork+0x14/0x24)
> Exception stack(0xc4433fb0 to 0xc4433ff8)
> 3fa0: 00000000 00000000 00000000 00000000
> 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> ---[ end trace 8f9e35e2d6224882 ]---

My first guess would be that this is just the missing irq domain code:

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 38e096e6925f..7c195af6f75d 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -205,6 +205,7 @@ config GPIO_EP93XX
depends on ARCH_EP93XX
select GPIO_GENERIC
select GPIOLIB_IRQCHIP
+ select IRQ_DOMAIN_HIERARCHY

config GPIO_EXAR
tristate "Support for GPIO pins on XR17V352/354/358"

But most likely there are more changes required to the gpio code.

> 2. Broken sound (I2S), this looks like below in the log:
>
> ep93xx-i2s ep93xx-i2s: Missing dma channel for stream: 0
> CS4271: ASoC: pcm constructor failed: -22
> edb93xx-audio edb93xx-audio: ASoC: can't create pcm CS4271 HiFi :-22
>
> And /proc/interrupts has two entries less. Without patch:
>
> # cat /proc/interrupts
> CPU0
> 7: 0 VIC 7 Edge i2s-pcm-out
> 8: 0 VIC 8 Edge i2s-pcm-in
> 39: 2 VIC 7 Edge eth0
> 51: 7532 VIC 19 Edge ep93xx timer
> 52: 144 VIC 20 Edge uart-pl010
> 53: 4 VIC 21 Edge ep93xx-spi
> 60: 0 VIC 28 Edge ep93xx-i2s
> Err: 0
>
> With patch:
>
> # cat /proc/interrupts
> CPU0
> 39: 146 VIC 7 Edge eth0
> 51: 162161 VIC 19 Edge ep93xx timer
> 52: 139 VIC 20 Edge uart-pl010
> 53: 4 VIC 21 Edge ep93xx-spi
> 60: 0 VIC 28 Edge ep93xx-i2s
> Err: 0

I guess that is partial success: some irqs do work ;-)

The two interrupts that did not get registered are for the
dmaengine driver, and that makes sense given the error
message about the DMA not working. No idea how
that would be a result of the irq changes though.

> I will try to look into I2S problem...

Thanks!

Arnd

2019-10-19 20:24:54

by Alexander Sverdlin

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

Hi!

On Sat, 19 Oct 2019 22:08:40 +0200
Arnd Bergmann <[email protected]> wrote:

> > # cat /proc/interrupts
> > CPU0
> > 39: 146 VIC 7 Edge eth0
> > 51: 162161 VIC 19 Edge ep93xx timer
> > 52: 139 VIC 20 Edge uart-pl010
> > 53: 4 VIC 21 Edge ep93xx-spi
> > 60: 0 VIC 28 Edge ep93xx-i2s
> > Err: 0
>
> I guess that is partial success: some irqs do work ;-)

Yep, VIC1 is working, while VIC0 is not.

> The two interrupts that did not get registered are for the
> dmaengine driver, and that makes sense given the error
> message about the DMA not working. No idea how
> that would be a result of the irq changes though.

Seems, that it has exposed some incompatibilities of
starting IRQ 0 in EP93xx platform fir VIC0 and VIC code
itself, which assumes 0 means "auto assignment" (refer
to vic_init()).

But there are more problems I didn't resolve yet.

--
Alexander Sverdlin.

2019-10-19 20:48:24

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

On Sat, Oct 19, 2019 at 10:24 PM Alexander Sverdlin
<[email protected]> wrote:
> On Sat, 19 Oct 2019 22:08:40 +0200
> Arnd Bergmann <[email protected]> wrote:
>
> > > # cat /proc/interrupts
> > > CPU0
> > > 39: 146 VIC 7 Edge eth0
> > > 51: 162161 VIC 19 Edge ep93xx timer
> > > 52: 139 VIC 20 Edge uart-pl010
> > > 53: 4 VIC 21 Edge ep93xx-spi
> > > 60: 0 VIC 28 Edge ep93xx-i2s
> > > Err: 0
> >
> > I guess that is partial success: some irqs do work ;-)
>
> Yep, VIC1 is working, while VIC0 is not.
>
> > The two interrupts that did not get registered are for the
> > dmaengine driver, and that makes sense given the error
> > message about the DMA not working. No idea how
> > that would be a result of the irq changes though.
>
> Seems, that it has exposed some incompatibilities of
> starting IRQ 0 in EP93xx platform fir VIC0 and VIC code
> itself, which assumes 0 means "auto assignment" (refer
> to vic_init()).

Ah, that makes sense. so all interrupt numbers need to
be shifted by a fixed number (e.g. 1) like we did for
other platforms (see attachment).

Arnd


Attachments:
ep93xx_vic.patch (6.10 kB)

2019-10-19 21:15:04

by Alexander Sverdlin

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

Hi!

On Sat, 19 Oct 2019 22:44:18 +0200
Arnd Bergmann <[email protected]> wrote:

> > > > # cat /proc/interrupts
> > > > CPU0
> > > > 39: 146 VIC 7 Edge eth0
> > > > 51: 162161 VIC 19 Edge ep93xx timer
> > > > 52: 139 VIC 20 Edge uart-pl010
> > > > 53: 4 VIC 21 Edge ep93xx-spi
> > > > 60: 0 VIC 28 Edge ep93xx-i2s
> > > > Err: 0
> > >
> > > I guess that is partial success: some irqs do work ;-)
> >
> > Yep, VIC1 is working, while VIC0 is not.
> >
> > > The two interrupts that did not get registered are for the
> > > dmaengine driver, and that makes sense given the error
> > > message about the DMA not working. No idea how
> > > that would be a result of the irq changes though.
> >
> > Seems, that it has exposed some incompatibilities of
> > starting IRQ 0 in EP93xx platform fir VIC0 and VIC code
> > itself, which assumes 0 means "auto assignment" (refer
> > to vic_init()).
>
> Ah, that makes sense. so all interrupt numbers need to
> be shifted by a fixed number (e.g. 1) like we did for
> other platforms (see attachment).

Yes, the below patch resolved both GPIO and DMA issues.
Previous patch (selecting IRQ_DOMAIN_HIERARCHY) is not
required.

If you re-spin all 3 ep93xx-relevant patches together, you can put my
Tested-by: Alexander Sverdlin <[email protected]>
on them.

> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index 6fb19a393fd2..f0a71d4e076f 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -47,6 +47,7 @@
> #include <asm/mach/map.h>
>
> #include "soc.h"
> +#include "irqs.h"
>
> /*************************************************************************
> * Static I/O mappings that are needed for all EP93xx platforms
> @@ -75,8 +76,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/irqs.h b/arch/arm/mach-ep93xx/irqs.h
> index 3ffdb3a2f3e4..353201b90c66 100644
> --- a/arch/arm/mach-ep93xx/irqs.h
> +++ b/arch/arm/mach-ep93xx/irqs.h
> @@ -2,69 +2,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

--
Alexander Sverdlin.

2019-10-20 11:52:59

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

On Sat, Oct 19, 2019 at 11:14 PM Alexander Sverdlin
<[email protected]> wrote:
> On Sat, 19 Oct 2019 22:44:18 +0200
> Arnd Bergmann <[email protected]> wrote:
> > Ah, that makes sense. so all interrupt numbers need to
> > be shifted by a fixed number (e.g. 1) like we did for
> > other platforms (see attachment).
>
> Yes, the below patch resolved both GPIO and DMA issues.
> Previous patch (selecting IRQ_DOMAIN_HIERARCHY) is not
> required.
>
> If you re-spin all 3 ep93xx-relevant patches together, you can put my
> Tested-by: Alexander Sverdlin <[email protected]>
> on them.

Awesome, thanks for testing.

I only remember sending two patches for ep93xx:
ARM: ep93xx: make mach/ep93xx-regs.h local
ARM: ep93xx: enable SPARSE_IRQ

and have added the Tested-by tag to them now. Is there a third one
I missed?

Arnd

2019-10-20 21:48:36

by Alexander Sverdlin

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

Hi!

On 20/10/2019 13:49, Arnd Bergmann wrote:
>>> Ah, that makes sense. so all interrupt numbers need to
>>> be shifted by a fixed number (e.g. 1) like we did for
>>> other platforms (see attachment).
>> Yes, the below patch resolved both GPIO and DMA issues.
^^^^^^^^^^^^^^^
>> Previous patch (selecting IRQ_DOMAIN_HIERARCHY) is not
>> required.
>>
>> If you re-spin all 3 ep93xx-relevant patches together, you can put my
>> Tested-by: Alexander Sverdlin <[email protected]>
>> on them.
> Awesome, thanks for testing.
>
> I only remember sending two patches for ep93xx:
> ARM: ep93xx: make mach/ep93xx-regs.h local
> ARM: ep93xx: enable SPARSE_IRQ
>
> and have added the Tested-by tag to them now. Is there a third one
> I missed?

The patch shifting the IRQ-numbering by one is a prerequisite for the two
above patches, right?

--
Alex.

2019-10-21 06:55:13

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

On Sun, Oct 20, 2019 at 11:47 PM Alexander Sverdlin
<[email protected]> wrote:
> On 20/10/2019 13:49, Arnd Bergmann wrote:
> >>> Ah, that makes sense. so all interrupt numbers need to
> >>> be shifted by a fixed number (e.g. 1) like we did for
> >>> other platforms (see attachment).
> >> Yes, the below patch resolved both GPIO and DMA issues.
> ^^^^^^^^^^^^^^^
> >> Previous patch (selecting IRQ_DOMAIN_HIERARCHY) is not
> >> required.
> >>
> >> If you re-spin all 3 ep93xx-relevant patches together, you can put my
> >> Tested-by: Alexander Sverdlin <[email protected]>
> >> on them.
> > Awesome, thanks for testing.
> >
> > I only remember sending two patches for ep93xx:
> > ARM: ep93xx: make mach/ep93xx-regs.h local
> > ARM: ep93xx: enable SPARSE_IRQ
> >
> > and have added the Tested-by tag to them now. Is there a third one
> > I missed?
>
> The patch shifting the IRQ-numbering by one is a prerequisite for the two
> above patches, right?

Ah, now I see what you mean. I had folded that change into the sparse-irq
change, but you are right that it makes more sense as a separate
changeset before the other ones. Changing that now.

Thanks,

Arnd

2019-11-04 15:00:27

by Linus Walleij

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

On Fri, Oct 18, 2019 at 6:30 PM Arnd Bergmann <[email protected]> wrote:

> 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: Sudeep Holla <[email protected]>
> Cc: Lorenzo Pieralisi <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>

Hi Arnd, it looks OK but is this one of those patches that are
only formatted for review because I just can't seem to apply it :(

Do you have it on some branch I can pull in?

Yours,
Linus Walleij

2019-11-04 15:14:17

by Sudeep Holla

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

On Fri, Oct 18, 2019 at 06:29:14PM +0200, Arnd Bergmann wrote:
> 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: Sudeep Holla <[email protected]>

Looks good to me, so for vexpress part:
Acked-by: Sudeep Holla <[email protected]>

As Linus W requested, if you share a branch, I can give it a go on
Vexpress TC2.

--
Regards,
Sudeep

2019-11-04 15:27:34

by Arnd Bergmann

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

On Mon, Nov 4, 2019 at 4:13 PM Sudeep Holla <[email protected]> wrote:
>
> On Fri, Oct 18, 2019 at 06:29:14PM +0200, Arnd Bergmann wrote:
> > 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: Sudeep Holla <[email protected]>
>
> Looks good to me, so for vexpress part:
> Acked-by: Sudeep Holla <[email protected]>
>
> As Linus W requested, if you share a branch, I can give it a go on
> Vexpress TC2.

You are of course both right, I should have split this out into a separate
branch, rather than sticking it on the end of the completely unrelated
pxa-multiplatform branch.

For testing the changes, this should be fine in the meantime:

https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=pxa-multiplatform



Arnd

2019-11-05 16:59:42

by Sudeep Holla

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

On Mon, Nov 4, 2019 at 3:26 PM Arnd Bergmann <[email protected]> wrote:
>
> On Mon, Nov 4, 2019 at 4:13 PM Sudeep Holla <[email protected]> wrote:
> >
> > On Fri, Oct 18, 2019 at 06:29:14PM +0200, Arnd Bergmann wrote:
> > > 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: Sudeep Holla <[email protected]>
> >
> > Looks good to me, so for vexpress part:
> > Acked-by: Sudeep Holla <[email protected]>
> >
> > As Linus W requested, if you share a branch, I can give it a go on
> > Vexpress TC2.
>
> You are of course both right, I should have split this out into a separate
> branch, rather than sticking it on the end of the completely unrelated
> pxa-multiplatform branch.
>
> For testing the changes, this should be fine in the meantime:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=pxa-multiplatform

Thanks, tested this branch and found no issues.
So in addition to ack:

Tested-by: Sudeep Holla <[email protected]>

--
Regards,
Sudeep