From patchwork Tue Apr 5 09:17:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12801337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5592EC433EF for ; Tue, 5 Apr 2022 09:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7ocelOdZB+Vl6t+z19yaMqw3bn8kLRy4Af2spy4PuYM=; b=ifpvB7nwpp2aOf Oj1n60KQv+POXmiDNjWuZyXyly+dEPbFJBz4vKfTdOzT7b4GxS6EHTH5mJcLCXSwV4HGkUf/TzRVB eAtnK1aVsdj4porM2qbmi9rZaPUNIAku1+QaPRNxlySkigFjcS97mJuJbOZtDGPpaiZf03WKo93hI 9c7jtYnZ0QBAbaISZB9OWXe79bZvMMC8NSICzpGyCLPtJ/pUnAaiN0fFVNck/w+w2LsbQPf5GjqNq bDrZ2VA/BGgzJw9Bap26FYDdColMjDOPV74h9fRUSLu8Q3sCsxtL69a9k7nrANGDDg2yldHoTYNob INQBrQq2uwJZfg/tZi1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbfN0-000LBs-2u; Tue, 05 Apr 2022 09:21:02 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbfL3-000K9n-Ju for linux-arm-kernel@lists.infradead.org; Tue, 05 Apr 2022 09:19:03 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 189AF61663; Tue, 5 Apr 2022 09:19:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FFBCC385A8; Tue, 5 Apr 2022 09:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649150340; bh=B/tl0sLKN/jq3y3vKn6NywiuZfLqqyXYtHMpnT36iZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H76qWq8PTbzVION7e1O3AqI8T+Ojbrjf9nMoXOAEyWKVp6xYXony2BIW/PHRxEpBP yp0KFdfwkeOhu/vNY725yzPvPArmX3SLO0MWpMSv6v9CpUJ+S4xJJJB3nRP1AeDQOW /psAekrbP5q5agfjTg2pmUwS/X6SAAMIpxriXA/x26/wAMRCpvY+DMdffjUq/uzCkT k18qRWlI2Xg8FfDb02sppQ7fEY2ovzcTXP0HfyyyLn8FYX2W5EiOUJCBo7pRUOkbZG 8aZKheTTPjHl2MOQM1iaEih8S31lShDtzv3WSK9xlZu5I/wQRAlrI4bOzPBdkjhY43 faDclQ0WZVtaQ== From: Arnd Bergmann To: Cc: Arnd Bergmann , Russell King , Hartley Sweeten , Alexander Sverdlin , Hubert Feurstein , Lukasz Majewski , Krzysztof Kozlowski , Alim Akhtar , Linus Walleij , Imre Kaloz , Krzysztof Halasa , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Simtec Linux Team , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Ard Biesheuvel , Stephen Boyd , Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 10/12] ARM: iop32x: enable multiplatform support Date: Tue, 5 Apr 2022 11:17:48 +0200 Message-Id: <20220405091750.3076973-11-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220405091750.3076973-1-arnd@kernel.org> References: <20220405091750.3076973-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220405_021901_805192_B4B04752 X-CRM114-Status: GOOD ( 19.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann 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/Kconfig | 14 ----------- arch/arm/mach-iop32x/Kconfig | 17 ++++++++----- arch/arm/mach-iop32x/em7210.c | 1 + arch/arm/mach-iop32x/glantank.c | 1 + arch/arm/mach-iop32x/include/mach/irqs.h | 14 ----------- .../arm/mach-iop32x/include/mach/uncompress.h | 25 ------------------- arch/arm/mach-iop32x/iq31244.c | 1 + arch/arm/mach-iop32x/iq80321.c | 1 + arch/arm/mach-iop32x/irqs.h | 2 ++ arch/arm/mach-iop32x/n2100.c | 1 + 10 files changed, 18 insertions(+), 59 deletions(-) delete mode 100644 arch/arm/mach-iop32x/include/mach/irqs.h delete mode 100644 arch/arm/mach-iop32x/include/mach/uncompress.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 68b0a857f9e5..94909cadb78a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -356,17 +356,6 @@ config ARCH_FOOTBRIDGE Support for systems based on the DC21285 companion chip ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. -config ARCH_IOP32X - bool "IOP32x-based" - select CPU_XSCALE - select GPIO_IOP - select GPIOLIB - select FORCE_PCI - select PLAT_IOP - help - Support for Intel's 80219 and IOP32X (XScale) family of - processors. - config ARCH_IXP4XX bool "IXP4xx-based" select ARCH_SUPPORTS_BIG_ENDIAN @@ -688,9 +677,6 @@ config ARCH_MPS2 config ARCH_ACORN bool -config PLAT_IOP - bool - config PLAT_ORION bool select CLKSRC_MMIO diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig index f1f342cb0509..07dd137b8867 100644 --- a/arch/arm/mach-iop32x/Kconfig +++ b/arch/arm/mach-iop32x/Kconfig @@ -1,9 +1,16 @@ # SPDX-License-Identifier: GPL-2.0 -if ARCH_IOP32X - -menu "IOP32x Implementation Options" +menuconfig ARCH_IOP32X + bool "IOP32x-based platforms" + depends on ARCH_MULTI_V5 + select CPU_XSCALE + select GPIO_IOP + select GPIOLIB + select FORCE_PCI + help + Support for Intel's 80219 and IOP32X (XScale) family of + processors. -comment "IOP32x Platform Types" +if ARCH_IOP32X config MACH_EP80219 bool @@ -42,6 +49,4 @@ config MACH_EM7210 board. Say also Y here if you have a SS4000e Baxter Creek NAS appliance." -endmenu - endif diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c index d43ced3cd4e7..ac130aba5a6e 100644 --- a/arch/arm/mach-iop32x/em7210.c +++ b/arch/arm/mach-iop32x/em7210.c @@ -223,6 +223,7 @@ static void __init em7210_init_machine(void) MACHINE_START(EM7210, "Lanner EM7210") .atag_offset = 0x100, + .nr_irqs = IOP32X_NR_IRQS, .map_io = em7210_map_io, .init_irq = iop32x_init_irq, .init_time = em7210_timer_init, diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index 2fe0f77d1f1d..cd6e7da2ea10 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c @@ -205,6 +205,7 @@ static void __init glantank_init_machine(void) MACHINE_START(GLANTANK, "GLAN Tank") /* Maintainer: Lennert Buytenhek */ .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,