From a3102fafdce6f150e5a46e1725bb1732f8953a01 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sat, 2 Apr 2022 16:45:07 +0200 Subject: ARM: iop32x: enable multiplatform support After iop32x was converted to the generic multi-irq entry code, nothing really stops us from building it into a generic kernel. The two last headers can simply be removed, the mach/irqs.h gets replaced with the sparse-irq intiialization from the board specific .nr_irqs value, and the decompressor debug output can use the debug_ll hack that all other platforms use. Signed-off-by: Arnd Bergmann --- arch/arm/mach-iop32x/Kconfig | 17 +++++++++++------ arch/arm/mach-iop32x/em7210.c | 1 + arch/arm/mach-iop32x/glantank.c | 1 + arch/arm/mach-iop32x/include/mach/irqs.h | 14 -------------- arch/arm/mach-iop32x/include/mach/uncompress.h | 25 ------------------------- arch/arm/mach-iop32x/iq31244.c | 1 + arch/arm/mach-iop32x/iq80321.c | 1 + arch/arm/mach-iop32x/irqs.h | 2 ++ arch/arm/mach-iop32x/n2100.c | 1 + 9 files changed, 18 insertions(+), 45 deletions(-) delete mode 100644 arch/arm/mach-iop32x/include/mach/irqs.h delete mode 100644 arch/arm/mach-iop32x/include/mach/uncompress.h (limited to 'arch/arm/mach-iop32x') diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig index f1f342cb0509..07dd137b8867 100644 --- a/arch/arm/mach-iop32x/Kconfig +++ b/arch/arm/mach-iop32x/Kconfig @@ -1,9 +1,16 @@ # SPDX-License-Identifier: GPL-2.0 -if ARCH_IOP32X - -menu "IOP32x Implementation Options" +menuconfig ARCH_IOP32X + bool "IOP32x-based platforms" + depends on ARCH_MULTI_V5 + select CPU_XSCALE + select GPIO_IOP + select GPIOLIB + select FORCE_PCI + help + Support for Intel's 80219 and IOP32X (XScale) family of + processors. -comment "IOP32x Platform Types" +if ARCH_IOP32X config MACH_EP80219 bool @@ -42,6 +49,4 @@ config MACH_EM7210 board. Say also Y here if you have a SS4000e Baxter Creek NAS appliance." -endmenu - endif diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c index d43ced3cd4e7..ac130aba5a6e 100644 --- a/arch/arm/mach-iop32x/em7210.c +++ b/arch/arm/mach-iop32x/em7210.c @@ -223,6 +223,7 @@ static void __init em7210_init_machine(void) MACHINE_START(EM7210, "Lanner EM7210") .atag_offset = 0x100, + .nr_irqs = IOP32X_NR_IRQS, .map_io = em7210_map_io, .init_irq = iop32x_init_irq, .init_time = em7210_timer_init, diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index 2fe0f77d1f1d..cd6e7da2ea10 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c @@ -205,6 +205,7 @@ static void __init glantank_init_machine(void) MACHINE_START(GLANTANK, "GLAN Tank") /* Maintainer: Lennert Buytenhek */ .atag_offset = 0x100, + .nr_irqs = IOP32X_NR_IRQS, .map_io = glantank_map_io, .init_irq = iop32x_init_irq, .init_time = glantank_timer_init, diff --git a/arch/arm/mach-iop32x/include/mach/irqs.h b/arch/arm/mach-iop32x/include/mach/irqs.h deleted file mode 100644 index e09ae5f48aec..000000000000 --- a/arch/arm/mach-iop32x/include/mach/irqs.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * arch/arm/mach-iop32x/include/mach/irqs.h - * - * Author: Rory Bolt - * Copyright: (C) 2002 Rory Bolt - */ - -#ifndef __IRQS_H -#define __IRQS_H - -#define NR_IRQS 33 - -#endif diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h deleted file mode 100644 index c8548875d942..000000000000 --- a/arch/arm/mach-iop32x/include/mach/uncompress.h +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * arch/arm/mach-iop32x/include/mach/uncompress.h - */ - -#include -#include -#include - -#define uart_base ((volatile u8 *)0xfe800000) - -#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) - -static inline void putc(char c) -{ - while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE) - barrier(); - uart_base[UART_TX] = c; -} - -static inline void flush(void) -{ -} - -#define arch_decomp_setup() do { } while (0) diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index 49caaa703881..8b4c29d17265 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c @@ -324,6 +324,7 @@ MACHINE_END MACHINE_START(EP80219, "Intel EP80219") /* Maintainer: Intel Corp. */ .atag_offset = 0x100, + .nr_irqs = IOP32X_NR_IRQS, .map_io = iq31244_map_io, .init_irq = iop32x_init_irq, .init_time = iq31244_timer_init, diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index b455d7073296..d9780c4660cb 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c @@ -183,6 +183,7 @@ static void __init iq80321_init_machine(void) MACHINE_START(IQ80321, "Intel IQ80321") /* Maintainer: Intel Corp. */ .atag_offset = 0x100, + .nr_irqs = IOP32X_NR_IRQS, .map_io = iq80321_map_io, .init_irq = iop32x_init_irq, .init_time = iq80321_timer_init, diff --git a/arch/arm/mach-iop32x/irqs.h b/arch/arm/mach-iop32x/irqs.h index e1dfc8b4e7d7..e9fc88e09189 100644 --- a/arch/arm/mach-iop32x/irqs.h +++ b/arch/arm/mach-iop32x/irqs.h @@ -43,4 +43,6 @@ #define IRQ_IOP32X_XINT3 IOP_IRQ(30) #define IRQ_IOP32X_HPI IOP_IRQ(31) +#define IOP32X_NR_IRQS (IRQ_IOP32X_HPI + 1) + #endif diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index bf99e718f8b8..bb1e2e11bf35 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c @@ -358,6 +358,7 @@ static void __init n2100_init_machine(void) MACHINE_START(N2100, "Thecus N2100") /* Maintainer: Lennert Buytenhek */ .atag_offset = 0x100, + .nr_irqs = IOP32X_NR_IRQS, .map_io = n2100_map_io, .init_irq = iop32x_init_irq, .init_time = n2100_timer_init, -- cgit From 5d6f52671e76ca2d55d74e676ac4c38ceb14a2d3 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 4 Apr 2022 11:52:31 +0200 Subject: ARM: rework endianess selection Choosing big-endian vs little-endian kernels in Kconfig has not worked correctly since the introduction of CONFIG_ARCH_MULTIPLATFORM a long time ago. The problems is that CONFIG_BIG_ENDIAN depends on ARCH_SUPPORTS_BIG_ENDIAN, which can set by any one platform in the config, but would actually have to be supported by all of them. This was mostly ok for ARMv6/ARMv7 builds, since these are BE8 and tend to just work aside from problems in nonportable device drivers. For ARMv4/v5 machines, CONFIG_BIG_ENDIAN and CONFIG_ARCH_MULTIPLATFORM were never set together, so this was disabled on all those machines except for IXP4xx. As IXP4xx can now become part of ARCH_MULTIPLATFORM, it seems better to formalize this logic: all ARMv4/v5 platforms get an explicit dependency on being either big-endian (ixp4xx) or little-endian (the rest). We may want to fix ixp4xx in the future to support both, but it does not work in LE mode at the moment. For the ARMv6/v7 platforms, there are two ways this could be handled a) allow both modes only for platforms selecting 'ARCH_SUPPORTS_BIG_ENDIAN' today, but only LE mode for the others, given that these were added intentionally at some point. b) allow both modes everwhere, given that it was already possible to build that way by e.g. selecting ARCH_VIRT, and that the list is not an accurate reflection of which platforms may or may not work. Out of these, I picked b) because it seemed slighly more logical to me. Signed-off-by: Arnd Bergmann --- arch/arm/mach-iop32x/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-iop32x') diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig index 07dd137b8867..01f60a8e6404 100644 --- a/arch/arm/mach-iop32x/Kconfig +++ b/arch/arm/mach-iop32x/Kconfig @@ -2,6 +2,7 @@ menuconfig ARCH_IOP32X bool "IOP32x-based platforms" depends on ARCH_MULTI_V5 + depends on CPU_LITTLE_ENDIAN select CPU_XSCALE select GPIO_IOP select GPIOLIB -- cgit