From patchwork Tue Apr 5 09:17:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 558491 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4B75C4321E for ; Tue, 5 Apr 2022 09:53:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350127AbiDEJzU (ORCPT ); Tue, 5 Apr 2022 05:55:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236068AbiDEJbC (ORCPT ); Tue, 5 Apr 2022 05:31:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7836F10B9; Tue, 5 Apr 2022 02:18:12 -0700 (PDT) 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 E95DB61645; Tue, 5 Apr 2022 09:18:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19986C385A0; Tue, 5 Apr 2022 09:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649150291; bh=H0F69XTNeFYoiH0TOoODEQW7arKN3D+NDTM7oJiL1w8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZI96+y5WZ5YKP+jmDF7Bfenr5BbwUy30x3T+Zk6iBLz7qBE8vt1aMQONQ8mxwtsu1 7hhMC+oKntEqsgVBR6m/7aXu1GCirczzTHHbuCDLLiUxPHGksGNFlTsXV5GUAdYhzv fWpBW/zwbZnRAhvdhbltlF6WKlDr0rpYJDKMMbO2wkQ3em7V4tLTn0qb+eCglgMd97 yCpeQS1NGzXHGeGOU7azC62DbBwhAfr0zsz+NVYERKyf/2zI1QN3uaYi7gizHubUYh y4+5ICsKLakY2lpQVtCM0AXck6cDlRgv0yBtjDkVw7CB2HzcV6aKih2Q9w0kX/a6+d kKJe2tD4X8X3A== From: Arnd Bergmann 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 01/12] ARM: versatile: move integrator/realview/vexpress to versatile Date: Tue, 5 Apr 2022 11:17:39 +0200 Message-Id: <20220405091750.3076973-2-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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Arnd Bergmann These are all fairly small platforms by now, and they are closely related. Just move them all into a single directory. Cc: Linus Walleij Cc: Liviu Dudau Cc: Lorenzo Pieralisi Tested-by: Sudeep Holla Acked-by: Sudeep Holla Signed-off-by: Arnd Bergmann --- MAINTAINERS | 3 - arch/arm/Kconfig | 6 - arch/arm/Makefile | 7 +- arch/arm/mach-integrator/Kconfig | 125 ------- arch/arm/mach-integrator/Makefile | 10 - arch/arm/mach-realview/Kconfig | 103 ------ arch/arm/mach-realview/Makefile | 8 - arch/arm/mach-versatile/Kconfig | 308 ++++++++++++++++++ arch/arm/mach-versatile/Makefile | 32 +- .../Makefile.boot | 0 .../{mach-vexpress => mach-versatile}/dcscb.c | 4 +- .../dcscb_setup.S | 2 - .../headsmp.S | 2 - .../hotplug.c | 2 +- .../cm.h => mach-versatile/integrator-cm.h} | 0 .../integrator-hardware.h} | 0 .../core.c => mach-versatile/integrator.c} | 8 +- .../common.h => mach-versatile/integrator.h} | 0 .../integrator_ap.c | 8 +- .../integrator_cp.c | 8 +- .../platsmp-realview.c} | 2 +- .../platsmp-vexpress.c} | 7 +- .../platsmp.c | 4 +- .../include/plat => mach-versatile}/platsmp.h | 2 - .../realview.c} | 0 .../{mach-vexpress => mach-versatile}/spc.c | 0 .../{mach-vexpress => mach-versatile}/spc.h | 0 .../tc2_pm.c | 2 - .../v2m-mps2.c | 0 .../{mach-vexpress => mach-versatile}/v2m.c | 2 +- .../{versatile_dt.c => versatile.c} | 0 .../core.h => mach-versatile/vexpress.h} | 0 arch/arm/mach-vexpress/Kconfig | 81 ----- arch/arm/mach-vexpress/Makefile | 19 -- arch/arm/plat-versatile/Makefile | 5 - 35 files changed, 357 insertions(+), 403 deletions(-) delete mode 100644 arch/arm/mach-integrator/Kconfig delete mode 100644 arch/arm/mach-integrator/Makefile delete mode 100644 arch/arm/mach-realview/Kconfig delete mode 100644 arch/arm/mach-realview/Makefile rename arch/arm/{mach-vexpress => mach-versatile}/Makefile.boot (100%) rename arch/arm/{mach-vexpress => mach-versatile}/dcscb.c (97%) rename arch/arm/{mach-vexpress => mach-versatile}/dcscb_setup.S (95%) rename arch/arm/{plat-versatile => mach-versatile}/headsmp.S (94%) rename arch/arm/{plat-versatile => mach-versatile}/hotplug.c (98%) rename arch/arm/{mach-integrator/cm.h => mach-versatile/integrator-cm.h} (100%) rename arch/arm/{mach-integrator/hardware.h => mach-versatile/integrator-hardware.h} (100%) rename arch/arm/{mach-integrator/core.c => mach-versatile/integrator.c} (95%) rename arch/arm/{mach-integrator/common.h => mach-versatile/integrator.h} (100%) rename arch/arm/{mach-integrator => mach-versatile}/integrator_ap.c (97%) rename arch/arm/{mach-integrator => mach-versatile}/integrator_cp.c (96%) rename arch/arm/{mach-realview/platsmp-dt.c => mach-versatile/platsmp-realview.c} (98%) rename arch/arm/{mach-vexpress/platsmp.c => mach-versatile/platsmp-vexpress.c} (96%) rename arch/arm/{plat-versatile => mach-versatile}/platsmp.c (97%) rename arch/arm/{plat-versatile/include/plat => mach-versatile}/platsmp.h (87%) rename arch/arm/{mach-realview/realview-dt.c => mach-versatile/realview.c} (100%) rename arch/arm/{mach-vexpress => mach-versatile}/spc.c (100%) rename arch/arm/{mach-vexpress => mach-versatile}/spc.h (100%) rename arch/arm/{mach-vexpress => mach-versatile}/tc2_pm.c (99%) rename arch/arm/{mach-vexpress => mach-versatile}/v2m-mps2.c (100%) rename arch/arm/{mach-vexpress => mach-versatile}/v2m.c (97%) rename arch/arm/mach-versatile/{versatile_dt.c => versatile.c} (100%) rename arch/arm/{mach-vexpress/core.h => mach-versatile/vexpress.h} (100%) delete mode 100644 arch/arm/mach-vexpress/Kconfig delete mode 100644 arch/arm/mach-vexpress/Makefile delete mode 100644 arch/arm/plat-versatile/Makefile diff --git a/MAINTAINERS b/MAINTAINERS index fd768d43e048..6a0363b0f106 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1525,10 +1525,7 @@ F: Documentation/devicetree/bindings/mtd/mtd-physmap.yaml F: arch/arm/boot/dts/arm-realview-* F: arch/arm/boot/dts/integrator* F: arch/arm/boot/dts/versatile* -F: arch/arm/mach-integrator/ -F: arch/arm/mach-realview/ F: arch/arm/mach-versatile/ -F: arch/arm/plat-versatile/ F: drivers/bus/arm-integrator-lm.c F: drivers/clk/versatile/ F: drivers/i2c/busses/i2c-versatile.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2e8091e2d8a8..31f024e6e925 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -622,8 +622,6 @@ source "arch/arm/mach-hisi/Kconfig" source "arch/arm/mach-imx/Kconfig" -source "arch/arm/mach-integrator/Kconfig" - source "arch/arm/mach-iop32x/Kconfig" source "arch/arm/mach-ixp4xx/Kconfig" @@ -675,8 +673,6 @@ source "arch/arm/mach-rda/Kconfig" source "arch/arm/mach-realtek/Kconfig" -source "arch/arm/mach-realview/Kconfig" - source "arch/arm/mach-rockchip/Kconfig" source "arch/arm/mach-s3c/Kconfig" @@ -705,8 +701,6 @@ source "arch/arm/mach-ux500/Kconfig" source "arch/arm/mach-versatile/Kconfig" -source "arch/arm/mach-vexpress/Kconfig" - source "arch/arm/mach-vt8500/Kconfig" source "arch/arm/mach-zynq/Kconfig" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index a2391b8de5a5..8740e3a63afb 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -179,7 +179,6 @@ machine-$(CONFIG_ARCH_FOOTBRIDGE) += footbridge machine-$(CONFIG_ARCH_GEMINI) += gemini machine-$(CONFIG_ARCH_HIGHBANK) += highbank machine-$(CONFIG_ARCH_HISI) += hisi -machine-$(CONFIG_ARCH_INTEGRATOR) += integrator machine-$(CONFIG_ARCH_IOP32X) += iop32x machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx machine-$(CONFIG_ARCH_KEYSTONE) += keystone @@ -187,7 +186,6 @@ machine-$(CONFIG_ARCH_LPC18XX) += lpc18xx machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx machine-$(CONFIG_ARCH_MESON) += meson machine-$(CONFIG_ARCH_MMP) += mmp -machine-$(CONFIG_ARCH_MPS2) += vexpress machine-$(CONFIG_ARCH_MOXART) += moxart machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 machine-$(CONFIG_ARCH_MVEBU) += mvebu @@ -207,7 +205,6 @@ machine-$(CONFIG_ARCH_PXA) += pxa machine-$(CONFIG_ARCH_QCOM) += qcom machine-$(CONFIG_ARCH_RDA) += rda machine-$(CONFIG_ARCH_REALTEK) += realtek -machine-$(CONFIG_ARCH_REALVIEW) += realview machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip machine-$(CONFIG_ARCH_RPC) += rpc machine-$(CONFIG_PLAT_SAMSUNG) += s3c @@ -220,10 +217,9 @@ machine-$(CONFIG_ARCH_STM32) += stm32 machine-$(CONFIG_ARCH_SUNXI) += sunxi machine-$(CONFIG_ARCH_TEGRA) += tegra machine-$(CONFIG_ARCH_U8500) += ux500 -machine-$(CONFIG_ARCH_VERSATILE) += versatile -machine-$(CONFIG_ARCH_VEXPRESS) += vexpress machine-$(CONFIG_ARCH_VT8500) += vt8500 machine-$(CONFIG_ARCH_ZYNQ) += zynq +machine-$(CONFIG_PLAT_VERSATILE) += versatile machine-$(CONFIG_PLAT_SPEAR) += spear # Platform directory name. This list is sorted alphanumerically @@ -231,7 +227,6 @@ machine-$(CONFIG_PLAT_SPEAR) += spear plat-$(CONFIG_ARCH_OMAP) += omap plat-$(CONFIG_PLAT_ORION) += orion plat-$(CONFIG_PLAT_PXA) += pxa -plat-$(CONFIG_PLAT_VERSATILE) += versatile # The byte offset of the kernel image in RAM from the start of RAM. TEXT_OFFSET := $(textofs-y) diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig deleted file mode 100644 index d61ea616cf8e..000000000000 --- a/arch/arm/mach-integrator/Kconfig +++ /dev/null @@ -1,125 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -menuconfig ARCH_INTEGRATOR - bool "ARM Ltd. Integrator family" - depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6 - select ARM_AMBA - select CMA - select DMA_CMA - select HAVE_TCM - select CLK_ICST - select MFD_SYSCON - select PLAT_VERSATILE - select POWER_RESET - select POWER_RESET_VERSATILE - select POWER_SUPPLY - select SOC_INTEGRATOR_CM - select VERSATILE_FPGA_IRQ - help - Support for ARM's Integrator platform. - -if ARCH_INTEGRATOR - -config ARCH_INTEGRATOR_AP - bool "Support Integrator/AP and Integrator/PP2 platforms" - select INTEGRATOR_AP_TIMER - select SERIAL_AMBA_PL010 if TTY - select SERIAL_AMBA_PL010_CONSOLE if TTY - select SOC_BUS - help - Include support for the ARM(R) Integrator/AP and - Integrator/PP2 platforms. - -config INTEGRATOR_IMPD1 - bool "Include support for Integrator/IM-PD1" - depends on ARCH_INTEGRATOR_AP - select ARM_VIC - select GPIO_PL061 - select GPIOLIB - select REGULATOR - select REGULATOR_FIXED_VOLTAGE - help - The IM-PD1 is an add-on logic module for the Integrator which - allows ARM(R) Ltd PrimeCells to be developed and evaluated. - The IM-PD1 can be found on the Integrator/PP2 platform. - -config INTEGRATOR_CM720T - bool "Integrator/CM720T core module" - depends on ARCH_INTEGRATOR_AP - depends on ARCH_MULTI_V4T - select CPU_ARM720T - -config INTEGRATOR_CM920T - bool "Integrator/CM920T core module" - depends on ARCH_INTEGRATOR_AP - depends on ARCH_MULTI_V4T - select CPU_ARM920T - -config INTEGRATOR_CM922T_XA10 - bool "Integrator/CM922T-XA10 core module" - depends on ARCH_MULTI_V4T - depends on ARCH_INTEGRATOR_AP - select CPU_ARM922T - -config INTEGRATOR_CM926EJS - bool "Integrator/CM926EJ-S core module" - depends on ARCH_INTEGRATOR_AP - depends on ARCH_MULTI_V5 - select CPU_ARM926T - -config INTEGRATOR_CM10200E_REV0 - bool "Integrator/CM10200E rev.0 core module" - depends on ARCH_INTEGRATOR_AP && n - depends on ARCH_MULTI_V5 - select CPU_ARM1020 - -config INTEGRATOR_CM10200E - bool "Integrator/CM10200E core module" - depends on ARCH_INTEGRATOR_AP && n - depends on ARCH_MULTI_V5 - select CPU_ARM1020E - -config INTEGRATOR_CM10220E - bool "Integrator/CM10220E core module" - depends on ARCH_INTEGRATOR_AP - depends on ARCH_MULTI_V5 - select CPU_ARM1022 - -config INTEGRATOR_CM1026EJS - bool "Integrator/CM1026EJ-S core module" - depends on ARCH_INTEGRATOR_AP - depends on ARCH_MULTI_V5 - select CPU_ARM1026 - -config INTEGRATOR_CM1136JFS - bool "Integrator/CM1136JF-S core module" - depends on ARCH_INTEGRATOR_AP - depends on ARCH_MULTI_V6 - select CPU_V6 - -config ARCH_INTEGRATOR_CP - bool "Support Integrator/CP platform" - depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 - select ARM_TIMER_SP804 - select SERIAL_AMBA_PL011 if TTY - select SERIAL_AMBA_PL011_CONSOLE if TTY - select SOC_BUS - help - Include support for the ARM(R) Integrator CP platform. - -config INTEGRATOR_CT926 - bool "Integrator/CT926 (ARM926EJ-S) core tile" - depends on ARCH_INTEGRATOR_CP - depends on ARCH_MULTI_V5 - select CPU_ARM926T - -config INTEGRATOR_CTB36 - bool "Integrator/CTB36 (ARM1136JF-S) core tile" - depends on ARCH_INTEGRATOR_CP - depends on ARCH_MULTI_V6 - select CPU_V6 - -config ARCH_CINTEGRATOR - depends on ARCH_INTEGRATOR_CP - def_bool y - -endif diff --git a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile deleted file mode 100644 index 7857a55c90b0..000000000000 --- a/arch/arm/mach-integrator/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -# -# Makefile for the linux kernel. -# - -# Object file lists. - -obj-y := core.o -obj-$(CONFIG_ARCH_INTEGRATOR_AP) += integrator_ap.o -obj-$(CONFIG_ARCH_INTEGRATOR_CP) += integrator_cp.o diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig deleted file mode 100644 index a4c36024b5e8..000000000000 --- a/arch/arm/mach-realview/Kconfig +++ /dev/null @@ -1,103 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -menuconfig ARCH_REALVIEW - bool "ARM Ltd. RealView family" - depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7 - select ARM_AMBA - select ARM_GIC - select ARM_TIMER_SP804 - select CLK_SP810 - select GPIO_PL061 if GPIOLIB - select HAVE_ARM_SCU if SMP - select HAVE_ARM_TWD if SMP - select HAVE_PATA_PLATFORM - select HAVE_TCM - select CLK_ICST - select MACH_REALVIEW_EB if ARCH_MULTI_V5 - select MFD_SYSCON - select PLAT_VERSATILE - select POWER_RESET - select POWER_RESET_VERSATILE - select POWER_SUPPLY - select SOC_REALVIEW - help - This enables support for ARM Ltd RealView boards. - -if ARCH_REALVIEW - -config MACH_REALVIEW_EB - bool "Support RealView(R) Emulation Baseboard" - select ARM_GIC - select CPU_ARM926T if ARCH_MULTI_V5 - help - Include support for the ARM(R) RealView(R) Emulation Baseboard - platform. On an ARMv5 kernel, this will include support for - the ARM926EJ-S core tile, while on an ARMv6/v7 kernel, at least - one of the ARM1136, ARM1176, ARM11MPCore or Cortex-A9MPCore - core tile options should be enabled. - -config REALVIEW_EB_ARM1136 - bool "Support ARM1136J(F)-S Tile" - depends on MACH_REALVIEW_EB && ARCH_MULTI_V6 - select CPU_V6 - help - Enable support for the ARM1136 tile fitted to the - Realview(R) Emulation Baseboard platform. - -config REALVIEW_EB_ARM1176 - bool "Support ARM1176JZ(F)-S Tile" - depends on MACH_REALVIEW_EB && ARCH_MULTI_V6 - help - Enable support for the ARM1176 tile fitted to the - Realview(R) Emulation Baseboard platform. - -config REALVIEW_EB_A9MP - bool "Support Multicore Cortex-A9 Tile" - depends on MACH_REALVIEW_EB && ARCH_MULTI_V7 - help - Enable support for the Cortex-A9MPCore tile fitted to the - Realview(R) Emulation Baseboard platform. - -config REALVIEW_EB_ARM11MP - bool "Support ARM11MPCore Tile" - depends on MACH_REALVIEW_EB && ARCH_MULTI_V6 - select HAVE_SMP - help - Enable support for the ARM11MPCore tile fitted to the Realview(R) - Emulation Baseboard platform. - -config MACH_REALVIEW_PB11MP - bool "Support RealView(R) Platform Baseboard for ARM11MPCore" - depends on ARCH_MULTI_V6 - select HAVE_SMP - help - Include support for the ARM(R) RealView(R) Platform Baseboard for - the ARM11MPCore. This platform has an on-board ARM11MPCore and has - support for PCI-E and Compact Flash. - -# ARMv6 CPU without K extensions, but does have the new exclusive ops -config MACH_REALVIEW_PB1176 - bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S" - depends on ARCH_MULTI_V6 - select CPU_V6 - select HAVE_TCM - help - Include support for the ARM(R) RealView(R) Platform Baseboard for - ARM1176JZF-S. - -config MACH_REALVIEW_PBA8 - bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform" - depends on ARCH_MULTI_V7 - help - Include support for the ARM(R) RealView Platform Baseboard for - Cortex(tm)-A8. This platform has an on-board Cortex-A8 and has - support for PCI-E and Compact Flash. - -config MACH_REALVIEW_PBX - bool "Support RealView(R) Platform Baseboard Explore for Cortex-A9" - depends on ARCH_MULTI_V7 - select ZONE_DMA - help - Include support for the ARM(R) RealView(R) Platform Baseboard - Explore. - -endif diff --git a/arch/arm/mach-realview/Makefile b/arch/arm/mach-realview/Makefile deleted file mode 100644 index e259091591b8..000000000000 --- a/arch/arm/mach-realview/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Makefile for the linux kernel. -# -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-versatile/include - -obj-y += realview-dt.o -obj-$(CONFIG_SMP) += platsmp-dt.o diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index f78a1d358031..94b492c12e8d 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig @@ -16,3 +16,311 @@ config ARCH_VERSATILE help This enables support for ARM Ltd Versatile board. +menuconfig ARCH_INTEGRATOR + bool "ARM Ltd. Integrator family" + depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6 + select ARM_AMBA + select CMA + select DMA_CMA + select HAVE_TCM + select CLK_ICST + select MFD_SYSCON + select PLAT_VERSATILE + select POWER_RESET + select POWER_RESET_VERSATILE + select POWER_SUPPLY + select SOC_INTEGRATOR_CM + select VERSATILE_FPGA_IRQ + help + Support for ARM's Integrator platform. + +if ARCH_INTEGRATOR + +config ARCH_INTEGRATOR_AP + bool "Support Integrator/AP and Integrator/PP2 platforms" + select INTEGRATOR_AP_TIMER + select SERIAL_AMBA_PL010 if TTY + select SERIAL_AMBA_PL010_CONSOLE if TTY + select SOC_BUS + help + Include support for the ARM(R) Integrator/AP and + Integrator/PP2 platforms. + +config INTEGRATOR_IMPD1 + bool "Include support for Integrator/IM-PD1" + depends on ARCH_INTEGRATOR_AP + select ARM_VIC + select GPIO_PL061 + select GPIOLIB + select REGULATOR + select REGULATOR_FIXED_VOLTAGE + help + The IM-PD1 is an add-on logic module for the Integrator which + allows ARM(R) Ltd PrimeCells to be developed and evaluated. + The IM-PD1 can be found on the Integrator/PP2 platform. + +config INTEGRATOR_CM720T + bool "Integrator/CM720T core module" + depends on ARCH_INTEGRATOR_AP + depends on ARCH_MULTI_V4T + select CPU_ARM720T + +config INTEGRATOR_CM920T + bool "Integrator/CM920T core module" + depends on ARCH_INTEGRATOR_AP + depends on ARCH_MULTI_V4T + select CPU_ARM920T + +config INTEGRATOR_CM922T_XA10 + bool "Integrator/CM922T-XA10 core module" + depends on ARCH_MULTI_V4T + depends on ARCH_INTEGRATOR_AP + select CPU_ARM922T + +config INTEGRATOR_CM926EJS + bool "Integrator/CM926EJ-S core module" + depends on ARCH_INTEGRATOR_AP + depends on ARCH_MULTI_V5 + select CPU_ARM926T + +config INTEGRATOR_CM10200E_REV0 + bool "Integrator/CM10200E rev.0 core module" + depends on ARCH_INTEGRATOR_AP && n + depends on ARCH_MULTI_V5 + select CPU_ARM1020 + +config INTEGRATOR_CM10200E + bool "Integrator/CM10200E core module" + depends on ARCH_INTEGRATOR_AP && n + depends on ARCH_MULTI_V5 + select CPU_ARM1020E + +config INTEGRATOR_CM10220E + bool "Integrator/CM10220E core module" + depends on ARCH_INTEGRATOR_AP + depends on ARCH_MULTI_V5 + select CPU_ARM1022 + +config INTEGRATOR_CM1026EJS + bool "Integrator/CM1026EJ-S core module" + depends on ARCH_INTEGRATOR_AP + depends on ARCH_MULTI_V5 + select CPU_ARM1026 + +config INTEGRATOR_CM1136JFS + bool "Integrator/CM1136JF-S core module" + depends on ARCH_INTEGRATOR_AP + depends on ARCH_MULTI_V6 + select CPU_V6 + +config ARCH_INTEGRATOR_CP + bool "Support Integrator/CP platform" + depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 + select ARM_TIMER_SP804 + select SERIAL_AMBA_PL011 if TTY + select SERIAL_AMBA_PL011_CONSOLE if TTY + select SOC_BUS + help + Include support for the ARM(R) Integrator CP platform. + +config INTEGRATOR_CT926 + bool "Integrator/CT926 (ARM926EJ-S) core tile" + depends on ARCH_INTEGRATOR_CP + depends on ARCH_MULTI_V5 + select CPU_ARM926T + +config INTEGRATOR_CTB36 + bool "Integrator/CTB36 (ARM1136JF-S) core tile" + depends on ARCH_INTEGRATOR_CP + depends on ARCH_MULTI_V6 + select CPU_V6 + +config ARCH_CINTEGRATOR + depends on ARCH_INTEGRATOR_CP + def_bool y + +endif + +menuconfig ARCH_REALVIEW + bool "ARM Ltd. RealView family" + depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7 + select ARM_AMBA + select ARM_GIC + select ARM_TIMER_SP804 + select CLK_SP810 + select GPIO_PL061 if GPIOLIB + select HAVE_ARM_SCU if SMP + select HAVE_ARM_TWD if SMP + select HAVE_PATA_PLATFORM + select HAVE_TCM + select CLK_ICST + select MACH_REALVIEW_EB if ARCH_MULTI_V5 + select MFD_SYSCON + select PLAT_VERSATILE + select POWER_RESET + select POWER_RESET_VERSATILE + select POWER_SUPPLY + select SOC_REALVIEW + help + This enables support for ARM Ltd RealView boards. + +if ARCH_REALVIEW + +config MACH_REALVIEW_EB + bool "Support RealView(R) Emulation Baseboard" + select ARM_GIC + select CPU_ARM926T if ARCH_MULTI_V5 + help + Include support for the ARM(R) RealView(R) Emulation Baseboard + platform. On an ARMv5 kernel, this will include support for + the ARM926EJ-S core tile, while on an ARMv6/v7 kernel, at least + one of the ARM1136, ARM1176, ARM11MPCore or Cortex-A9MPCore + core tile options should be enabled. + +config REALVIEW_EB_ARM1136 + bool "Support ARM1136J(F)-S Tile" + depends on MACH_REALVIEW_EB && ARCH_MULTI_V6 + select CPU_V6 + help + Enable support for the ARM1136 tile fitted to the + Realview(R) Emulation Baseboard platform. + +config REALVIEW_EB_ARM1176 + bool "Support ARM1176JZ(F)-S Tile" + depends on MACH_REALVIEW_EB && ARCH_MULTI_V6 + help + Enable support for the ARM1176 tile fitted to the + Realview(R) Emulation Baseboard platform. + +config REALVIEW_EB_A9MP + bool "Support Multicore Cortex-A9 Tile" + depends on MACH_REALVIEW_EB && ARCH_MULTI_V7 + help + Enable support for the Cortex-A9MPCore tile fitted to the + Realview(R) Emulation Baseboard platform. + +config REALVIEW_EB_ARM11MP + bool "Support ARM11MPCore Tile" + depends on MACH_REALVIEW_EB && ARCH_MULTI_V6 + select HAVE_SMP + help + Enable support for the ARM11MPCore tile fitted to the Realview(R) + Emulation Baseboard platform. + +config MACH_REALVIEW_PB11MP + bool "Support RealView(R) Platform Baseboard for ARM11MPCore" + depends on ARCH_MULTI_V6 + select HAVE_SMP + help + Include support for the ARM(R) RealView(R) Platform Baseboard for + the ARM11MPCore. This platform has an on-board ARM11MPCore and has + support for PCI-E and Compact Flash. + +# ARMv6 CPU without K extensions, but does have the new exclusive ops +config MACH_REALVIEW_PB1176 + bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S" + depends on ARCH_MULTI_V6 + select CPU_V6 + select HAVE_TCM + help + Include support for the ARM(R) RealView(R) Platform Baseboard for + ARM1176JZF-S. + +config MACH_REALVIEW_PBA8 + bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform" + depends on ARCH_MULTI_V7 + help + Include support for the ARM(R) RealView Platform Baseboard for + Cortex(tm)-A8. This platform has an on-board Cortex-A8 and has + support for PCI-E and Compact Flash. + +config MACH_REALVIEW_PBX + bool "Support RealView(R) Platform Baseboard Explore for Cortex-A9" + depends on ARCH_MULTI_V7 + select ZONE_DMA + help + Include support for the ARM(R) RealView(R) Platform Baseboard + Explore. + +endif + +menuconfig ARCH_VEXPRESS + bool "ARM Ltd. Versatile Express family" + depends on ARCH_MULTI_V7 + select ARCH_SUPPORTS_BIG_ENDIAN + select ARM_AMBA + select ARM_GIC + select ARM_GLOBAL_TIMER + select ARM_TIMER_SP804 + select GPIOLIB + select HAVE_ARM_SCU if SMP + select HAVE_ARM_TWD if SMP + select HAVE_PATA_PLATFORM + select CLK_ICST + select NO_IOPORT_MAP + select PLAT_VERSATILE + select POWER_RESET + select POWER_RESET_VEXPRESS + select POWER_SUPPLY + select REGULATOR if MMC_ARMMMCI + select REGULATOR_FIXED_VOLTAGE if REGULATOR + select VEXPRESS_CONFIG + help + This option enables support for systems using Cortex processor based + ARM core and logic (FPGA) tiles on the Versatile Express motherboard, + for example: + + - CoreTile Express A5x2 (V2P-CA5s) + - CoreTile Express A9x4 (V2P-CA9) + - CoreTile Express A15x2 (V2P-CA15) + - LogicTile Express 13MG (V2F-2XV6) with A5, A7, A9 or A15 SMMs + (Soft Macrocell Models) + - Versatile Express RTSMs (Models) + + You must boot using a Flattened Device Tree in order to use these + platforms. The traditional (ATAGs) boot method is not usable on + these boards with this option. + +if ARCH_VEXPRESS + +config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA + bool "Enable A5 and A9 only errata work-arounds" + default y + select ARM_ERRATA_643719 if SMP + select ARM_ERRATA_720789 + select PL310_ERRATA_753970 if CACHE_L2X0 + help + Provides common dependencies for Versatile Express platforms + based on Cortex-A5 and Cortex-A9 processors. In order to + build a working kernel, you must also enable relevant core + tile support or Flattened Device Tree based support options. + +config ARCH_VEXPRESS_DCSCB + bool "Dual Cluster System Control Block (DCSCB) support" + depends on MCPM + select ARM_CCI400_PORT_CTRL + help + Support for the Dual Cluster System Configuration Block (DCSCB). + This is needed to provide CPU and cluster power management + on RTSM implementing big.LITTLE. + +config ARCH_VEXPRESS_SPC + bool "Versatile Express Serial Power Controller (SPC)" + select PM_OPP + help + The TC2 (A15x2 A7x3) versatile express core tile integrates a logic + block called Serial Power Controller (SPC) that provides the interface + between the dual cluster test-chip and the M3 microcontroller that + carries out power management. + +config ARCH_VEXPRESS_TC2_PM + bool "Versatile Express TC2 power management" + depends on MCPM + select ARM_CCI400_PORT_CTRL + select ARCH_VEXPRESS_SPC + select ARM_CPU_SUSPEND + help + Support for CPU and cluster power management on Versatile Express + with a TC2 (A15x2 A7x3) big.LITTLE core tile. + +endif diff --git a/arch/arm/mach-versatile/Makefile b/arch/arm/mach-versatile/Makefile index 2b907718d467..27d712bcf1af 100644 --- a/arch/arm/mach-versatile/Makefile +++ b/arch/arm/mach-versatile/Makefile @@ -3,4 +3,34 @@ # Makefile for the linux kernel. # -obj-y := versatile_dt.o +# versatile +obj-$(CONFIG_ARCH_VERSATILE) += versatile.o + +# integrator +obj-$(CONFIG_ARCH_INTEGRATOR) += integrator.o +obj-$(CONFIG_ARCH_INTEGRATOR_AP) += integrator_ap.o +obj-$(CONFIG_ARCH_INTEGRATOR_CP) += integrator_cp.o + +# realview +obj-$(CONFIG_ARCH_REALVIEW) += realview.o + +# vexpress +obj-$(CONFIG_ARCH_VEXPRESS) := v2m.o +obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o +CFLAGS_dcscb.o += -march=armv7-a +CFLAGS_REMOVE_dcscb.o = -pg +obj-$(CONFIG_ARCH_VEXPRESS_SPC) += spc.o +CFLAGS_REMOVE_spc.o = -pg +obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM) += tc2_pm.o +CFLAGS_tc2_pm.o += -march=armv7-a +CFLAGS_REMOVE_tc2_pm.o = -pg + +# mps2 +obj-$(CONFIG_ARCH_MPS2) += v2m-mps2.o + +ifdef CONFIG_SMP +obj-y += headsmp.o platsmp.o +obj-$(CONFIG_ARCH_REALVIEW) += platsmp-realview.o +obj-$(CONFIG_ARCH_VEXPRESS) += platsmp-vexpress.o +obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o +endif diff --git a/arch/arm/mach-vexpress/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot similarity index 100% rename from arch/arm/mach-vexpress/Makefile.boot rename to arch/arm/mach-versatile/Makefile.boot diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-versatile/dcscb.c similarity index 97% rename from arch/arm/mach-vexpress/dcscb.c rename to arch/arm/mach-versatile/dcscb.c index a0554d7d04f7..866270e7f271 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-versatile/dcscb.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * arch/arm/mach-vexpress/dcscb.c - Dual Cluster System Configuration Block + * dcscb.c - Dual Cluster System Configuration Block * * Created by: Nicolas Pitre, May 2012 * Copyright: (C) 2012-2013 Linaro Limited @@ -20,7 +20,7 @@ #include #include -#include "core.h" +#include "vexpress.h" #define RST_HOLD0 0x0 #define RST_HOLD1 0x4 diff --git a/arch/arm/mach-vexpress/dcscb_setup.S b/arch/arm/mach-versatile/dcscb_setup.S similarity index 95% rename from arch/arm/mach-vexpress/dcscb_setup.S rename to arch/arm/mach-versatile/dcscb_setup.S index 0614b2ebd354..92d1fd9d7f6a 100644 --- a/arch/arm/mach-vexpress/dcscb_setup.S +++ b/arch/arm/mach-versatile/dcscb_setup.S @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * arch/arm/include/asm/dcscb_setup.S - * * Created by: Dave Martin, 2012-06-22 * Copyright: (C) 2012-2013 Linaro Limited */ diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/mach-versatile/headsmp.S similarity index 94% rename from arch/arm/plat-versatile/headsmp.S rename to arch/arm/mach-versatile/headsmp.S index 09d9fc30c8ca..99c32db412ae 100644 --- a/arch/arm/plat-versatile/headsmp.S +++ b/arch/arm/mach-versatile/headsmp.S @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * linux/arch/arm/plat-versatile/headsmp.S - * * Copyright (c) 2003 ARM Limited * All Rights Reserved */ diff --git a/arch/arm/plat-versatile/hotplug.c b/arch/arm/mach-versatile/hotplug.c similarity index 98% rename from arch/arm/plat-versatile/hotplug.c rename to arch/arm/mach-versatile/hotplug.c index 2e9dca38bec0..5a152175578b 100644 --- a/arch/arm/plat-versatile/hotplug.c +++ b/arch/arm/mach-versatile/hotplug.c @@ -15,7 +15,7 @@ #include #include -#include +#include "platsmp.h" static inline void versatile_immitation_enter_lowpower(unsigned int actrl_mask) { diff --git a/arch/arm/mach-integrator/cm.h b/arch/arm/mach-versatile/integrator-cm.h similarity index 100% rename from arch/arm/mach-integrator/cm.h rename to arch/arm/mach-versatile/integrator-cm.h diff --git a/arch/arm/mach-integrator/hardware.h b/arch/arm/mach-versatile/integrator-hardware.h similarity index 100% rename from arch/arm/mach-integrator/hardware.h rename to arch/arm/mach-versatile/integrator-hardware.h diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-versatile/integrator.c similarity index 95% rename from arch/arm/mach-integrator/core.c rename to arch/arm/mach-versatile/integrator.c index 0fe5e1dc9d89..fdf9c4db08a7 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-versatile/integrator.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * linux/arch/arm/mach-integrator/core.c - * * Copyright (C) 2000-2003 Deep Blue Solutions Ltd */ #include @@ -26,9 +24,9 @@ #include #include -#include "hardware.h" -#include "cm.h" -#include "common.h" +#include "integrator-hardware.h" +#include "integrator-cm.h" +#include "integrator.h" static DEFINE_RAW_SPINLOCK(cm_lock); static void __iomem *cm_base; diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-versatile/integrator.h similarity index 100% rename from arch/arm/mach-integrator/common.h rename to arch/arm/mach-versatile/integrator.h diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-versatile/integrator_ap.c similarity index 97% rename from arch/arm/mach-integrator/integrator_ap.c rename to arch/arm/mach-versatile/integrator_ap.c index 58b02cbbea72..44a69cc69376 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-versatile/integrator_ap.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* - * linux/arch/arm/mach-integrator/integrator_ap.c - * * Copyright (C) 2000-2003 Deep Blue Solutions Ltd */ #include @@ -20,9 +18,9 @@ #include #include -#include "hardware.h" -#include "cm.h" -#include "common.h" +#include "integrator-hardware.h" +#include "integrator-cm.h" +#include "integrator.h" /* Regmap to the AP system controller */ static struct regmap *ap_syscon_map; diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-versatile/integrator_cp.c similarity index 96% rename from arch/arm/mach-integrator/integrator_cp.c rename to arch/arm/mach-versatile/integrator_cp.c index b7eb4038798b..2ed4ded56b3f 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-versatile/integrator_cp.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * linux/arch/arm/mach-integrator/integrator_cp.c - * * Copyright (C) 2003 Deep Blue Solutions Ltd */ #include @@ -18,9 +16,9 @@ #include #include -#include "hardware.h" -#include "cm.h" -#include "common.h" +#include "integrator-hardware.h" +#include "integrator-cm.h" +#include "integrator.h" /* Base address to the core module header */ static struct regmap *cm_map; diff --git a/arch/arm/mach-realview/platsmp-dt.c b/arch/arm/mach-versatile/platsmp-realview.c similarity index 98% rename from arch/arm/mach-realview/platsmp-dt.c rename to arch/arm/mach-versatile/platsmp-realview.c index 5ae783767a5d..5d363385c801 100644 --- a/arch/arm/mach-realview/platsmp-dt.c +++ b/arch/arm/mach-versatile/platsmp-realview.c @@ -13,7 +13,7 @@ #include #include -#include +#include "platsmp.h" #define REALVIEW_SYS_FLAGSSET_OFFSET 0x30 diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-versatile/platsmp-vexpress.c similarity index 96% rename from arch/arm/mach-vexpress/platsmp.c rename to arch/arm/mach-versatile/platsmp-vexpress.c index 99c93124aa68..1ee3c45e71c9 100644 --- a/arch/arm/mach-vexpress/platsmp.c +++ b/arch/arm/mach-versatile/platsmp-vexpress.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * linux/arch/arm/mach-vexpress/platsmp.c - * * Copyright (C) 2002 ARM Ltd. * All Rights Reserved */ @@ -16,9 +14,8 @@ #include #include -#include - -#include "core.h" +#include "platsmp.h" +#include "vexpress.h" bool __init vexpress_smp_init_ops(void) { diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/mach-versatile/platsmp.c similarity index 97% rename from arch/arm/plat-versatile/platsmp.c rename to arch/arm/mach-versatile/platsmp.c index 3567296cec2a..fa7378321e23 100644 --- a/arch/arm/plat-versatile/platsmp.c +++ b/arch/arm/mach-versatile/platsmp.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * linux/arch/arm/plat-versatile/platsmp.c - * * Copyright (C) 2002 ARM Ltd. * All Rights Reserved * @@ -20,7 +18,7 @@ #include #include -#include +#include "platsmp.h" /* * versatile_cpu_release controls the release of CPUs from the holding diff --git a/arch/arm/plat-versatile/include/plat/platsmp.h b/arch/arm/mach-versatile/platsmp.h similarity index 87% rename from arch/arm/plat-versatile/include/plat/platsmp.h rename to arch/arm/mach-versatile/platsmp.h index 500605f48b80..171a0ab72220 100644 --- a/arch/arm/plat-versatile/include/plat/platsmp.h +++ b/arch/arm/mach-versatile/platsmp.h @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * linux/arch/arm/plat-versatile/include/plat/platsmp.h - * * Copyright (C) 2011 ARM Ltd. * All Rights Reserved */ diff --git a/arch/arm/mach-realview/realview-dt.c b/arch/arm/mach-versatile/realview.c similarity index 100% rename from arch/arm/mach-realview/realview-dt.c rename to arch/arm/mach-versatile/realview.c diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-versatile/spc.c similarity index 100% rename from arch/arm/mach-vexpress/spc.c rename to arch/arm/mach-versatile/spc.c diff --git a/arch/arm/mach-vexpress/spc.h b/arch/arm/mach-versatile/spc.h similarity index 100% rename from arch/arm/mach-vexpress/spc.h rename to arch/arm/mach-versatile/spc.h diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-versatile/tc2_pm.c similarity index 99% rename from arch/arm/mach-vexpress/tc2_pm.c rename to arch/arm/mach-versatile/tc2_pm.c index e96c42ae3602..0fe78da0c109 100644 --- a/arch/arm/mach-vexpress/tc2_pm.c +++ b/arch/arm/mach-versatile/tc2_pm.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * arch/arm/mach-vexpress/tc2_pm.c - TC2 power management support - * * Created by: Nicolas Pitre, October 2012 * Copyright: (C) 2012-2013 Linaro Limited * diff --git a/arch/arm/mach-vexpress/v2m-mps2.c b/arch/arm/mach-versatile/v2m-mps2.c similarity index 100% rename from arch/arm/mach-vexpress/v2m-mps2.c rename to arch/arm/mach-versatile/v2m-mps2.c diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-versatile/v2m.c similarity index 97% rename from arch/arm/mach-vexpress/v2m.c rename to arch/arm/mach-versatile/v2m.c index ffe7c7a85ae9..79afdf2a90b6 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-versatile/v2m.c @@ -3,7 +3,7 @@ #include #include -#include "core.h" +#include "vexpress.h" #define SYS_FLAGSSET 0x030 #define SYS_FLAGSCLR 0x034 diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile.c similarity index 100% rename from arch/arm/mach-versatile/versatile_dt.c rename to arch/arm/mach-versatile/versatile.c diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-versatile/vexpress.h similarity index 100% rename from arch/arm/mach-vexpress/core.h rename to arch/arm/mach-versatile/vexpress.h diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig deleted file mode 100644 index 2e6aff5a0f17..000000000000 --- a/arch/arm/mach-vexpress/Kconfig +++ /dev/null @@ -1,81 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -menuconfig ARCH_VEXPRESS - bool "ARM Ltd. Versatile Express family" - depends on ARCH_MULTI_V7 - select ARCH_SUPPORTS_BIG_ENDIAN - select ARM_AMBA - select ARM_GIC - select ARM_GLOBAL_TIMER - select ARM_TIMER_SP804 - select GPIOLIB - select HAVE_ARM_SCU if SMP - select HAVE_ARM_TWD if SMP - select HAVE_PATA_PLATFORM - select CLK_ICST - select NO_IOPORT_MAP - select PLAT_VERSATILE - select POWER_RESET - select POWER_RESET_VEXPRESS - select POWER_SUPPLY - select REGULATOR if MMC_ARMMMCI - select REGULATOR_FIXED_VOLTAGE if REGULATOR - select VEXPRESS_CONFIG - help - This option enables support for systems using Cortex processor based - ARM core and logic (FPGA) tiles on the Versatile Express motherboard, - for example: - - - CoreTile Express A5x2 (V2P-CA5s) - - CoreTile Express A9x4 (V2P-CA9) - - CoreTile Express A15x2 (V2P-CA15) - - LogicTile Express 13MG (V2F-2XV6) with A5, A7, A9 or A15 SMMs - (Soft Macrocell Models) - - Versatile Express RTSMs (Models) - - You must boot using a Flattened Device Tree in order to use these - platforms. The traditional (ATAGs) boot method is not usable on - these boards with this option. - -if ARCH_VEXPRESS - -config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA - bool "Enable A5 and A9 only errata work-arounds" - default y - select ARM_ERRATA_643719 if SMP - select ARM_ERRATA_720789 - select PL310_ERRATA_753970 if CACHE_L2X0 - help - Provides common dependencies for Versatile Express platforms - based on Cortex-A5 and Cortex-A9 processors. In order to - build a working kernel, you must also enable relevant core - tile support or Flattened Device Tree based support options. - -config ARCH_VEXPRESS_DCSCB - bool "Dual Cluster System Control Block (DCSCB) support" - depends on MCPM - select ARM_CCI400_PORT_CTRL - help - Support for the Dual Cluster System Configuration Block (DCSCB). - This is needed to provide CPU and cluster power management - on RTSM implementing big.LITTLE. - -config ARCH_VEXPRESS_SPC - bool "Versatile Express Serial Power Controller (SPC)" - select PM_OPP - help - The TC2 (A15x2 A7x3) versatile express core tile integrates a logic - block called Serial Power Controller (SPC) that provides the interface - between the dual cluster test-chip and the M3 microcontroller that - carries out power management. - -config ARCH_VEXPRESS_TC2_PM - bool "Versatile Express TC2 power management" - depends on MCPM - select ARM_CCI400_PORT_CTRL - select ARCH_VEXPRESS_SPC - select ARM_CPU_SUSPEND - help - Support for CPU and cluster power management on Versatile Express - with a TC2 (A15x2 A7x3) big.LITTLE core tile. - -endif diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile deleted file mode 100644 index 3651a1ed0f2b..000000000000 --- a/arch/arm/mach-vexpress/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -# -# Makefile for the linux kernel. -# -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := \ - -I$(srctree)/arch/arm/plat-versatile/include - -obj-$(CONFIG_ARCH_VEXPRESS) := v2m.o -obj-$(CONFIG_ARCH_VEXPRESS_DCSCB) += dcscb.o dcscb_setup.o -CFLAGS_dcscb.o += -march=armv7-a -CFLAGS_REMOVE_dcscb.o = -pg -obj-$(CONFIG_ARCH_VEXPRESS_SPC) += spc.o -CFLAGS_REMOVE_spc.o = -pg -obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM) += tc2_pm.o -CFLAGS_tc2_pm.o += -march=armv7-a -CFLAGS_REMOVE_tc2_pm.o = -pg -obj-$(CONFIG_SMP) += platsmp.o - -obj-$(CONFIG_ARCH_MPS2) += v2m-mps2.o diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile deleted file mode 100644 index 5de44a57c4de..000000000000 --- a/arch/arm/plat-versatile/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include - -obj-$(CONFIG_SMP) += headsmp.o platsmp.o -obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o From patchwork Tue Apr 5 09:17:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 558489 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59E6BC4167D for ; Tue, 5 Apr 2022 10:04:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350175AbiDEJ4B (ORCPT ); Tue, 5 Apr 2022 05:56:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236078AbiDEJbC (ORCPT ); Tue, 5 Apr 2022 05:31:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6D0922528; Tue, 5 Apr 2022 02:18:17 -0700 (PDT) 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 5558A61577; Tue, 5 Apr 2022 09:18:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C17DEC385A7; Tue, 5 Apr 2022 09:18:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649150296; bh=Wo392uEawl61tpBst45l5+t1WaSNVll46ELOkHU90ak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jwT5G0+JvjM2OoUCGaf7dYjAeelIXoF2JQyLEDTgg7eL7brW0igNcD8hgCb2+AW/J 4tB/4rEj+j3WEKLmckBuSbMUCBHVOx9o+7W0p60kim0EtQLwBJiZSYfvpqvKQJEmc3 9tLXDeU2SuIb587y/0UMTLL17i0Sc44upoLNM3s7HAgf1q4h/4tejh5e9aE4UI0SeF C6QSoTcFXYsc/DVQcO0/D7hCJNWWPi6Iv4sUe/g3trQRnePL1vh8UizJTelrDYLrKA VStP18jigA5M4KUgLuDYG9G75F/IELARplzLiX5uAY14Yi8cmfH8rrZNtcq0pdJg0A ZI0Dbpvsr0s+g== From: Arnd Bergmann 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 02/12] ARM: ep93xx: renumber interrupts Date: Tue, 5 Apr 2022 11:17:40 +0200 Message-Id: <20220405091750.3076973-3-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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Arnd Bergmann With the move to irq domains, no irqchip must start at number 0, so shift all the hardwired IRQ numbers by one. Tested-by: Alexander Sverdlin Signed-off-by: Arnd Bergmann Tested-by: Alexander Sverdlin Acked-by: Alexander Sverdlin --- arch/arm/mach-ep93xx/core.c | 4 +- arch/arm/mach-ep93xx/include/mach/irqs.h | 122 ++++++++++++----------- 2 files changed, 65 insertions(+), 61 deletions(-) diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index a3b4e843456a..e4569a5acc3f 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -75,8 +75,8 @@ void __init ep93xx_map_io(void) *************************************************************************/ void __init ep93xx_init_irq(void) { - vic_init(EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0); - vic_init(EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK, 0); + vic_init(EP93XX_VIC1_BASE, IRQ_EP93XX_VIC0, EP93XX_VIC1_VALID_IRQ_MASK, 0); + vic_init(EP93XX_VIC2_BASE, IRQ_EP93XX_VIC1, EP93XX_VIC2_VALID_IRQ_MASK, 0); } diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h b/arch/arm/mach-ep93xx/include/mach/irqs.h index 244daf83ce6d..60c69c4ed7e1 100644 --- a/arch/arm/mach-ep93xx/include/mach/irqs.h +++ b/arch/arm/mach-ep93xx/include/mach/irqs.h @@ -6,69 +6,73 @@ #ifndef __ASM_ARCH_IRQS_H #define __ASM_ARCH_IRQS_H -#define IRQ_EP93XX_COMMRX 2 -#define IRQ_EP93XX_COMMTX 3 -#define IRQ_EP93XX_TIMER1 4 -#define IRQ_EP93XX_TIMER2 5 -#define IRQ_EP93XX_AACINTR 6 -#define IRQ_EP93XX_DMAM2P0 7 -#define IRQ_EP93XX_DMAM2P1 8 -#define IRQ_EP93XX_DMAM2P2 9 -#define IRQ_EP93XX_DMAM2P3 10 -#define IRQ_EP93XX_DMAM2P4 11 -#define IRQ_EP93XX_DMAM2P5 12 -#define IRQ_EP93XX_DMAM2P6 13 -#define IRQ_EP93XX_DMAM2P7 14 -#define IRQ_EP93XX_DMAM2P8 15 -#define IRQ_EP93XX_DMAM2P9 16 -#define IRQ_EP93XX_DMAM2M0 17 -#define IRQ_EP93XX_DMAM2M1 18 -#define IRQ_EP93XX_GPIO0MUX 19 -#define IRQ_EP93XX_GPIO1MUX 20 -#define IRQ_EP93XX_GPIO2MUX 21 -#define IRQ_EP93XX_GPIO3MUX 22 -#define IRQ_EP93XX_UART1RX 23 -#define IRQ_EP93XX_UART1TX 24 -#define IRQ_EP93XX_UART2RX 25 -#define IRQ_EP93XX_UART2TX 26 -#define IRQ_EP93XX_UART3RX 27 -#define IRQ_EP93XX_UART3TX 28 -#define IRQ_EP93XX_KEY 29 -#define IRQ_EP93XX_TOUCH 30 +#define IRQ_EP93XX_VIC0 1 + +#define IRQ_EP93XX_COMMRX (IRQ_EP93XX_VIC0 + 2) +#define IRQ_EP93XX_COMMTX (IRQ_EP93XX_VIC0 + 3) +#define IRQ_EP93XX_TIMER1 (IRQ_EP93XX_VIC0 + 4) +#define IRQ_EP93XX_TIMER2 (IRQ_EP93XX_VIC0 + 5) +#define IRQ_EP93XX_AACINTR (IRQ_EP93XX_VIC0 + 6) +#define IRQ_EP93XX_DMAM2P0 (IRQ_EP93XX_VIC0 + 7) +#define IRQ_EP93XX_DMAM2P1 (IRQ_EP93XX_VIC0 + 8) +#define IRQ_EP93XX_DMAM2P2 (IRQ_EP93XX_VIC0 + 9) +#define IRQ_EP93XX_DMAM2P3 (IRQ_EP93XX_VIC0 + 10) +#define IRQ_EP93XX_DMAM2P4 (IRQ_EP93XX_VIC0 + 11) +#define IRQ_EP93XX_DMAM2P5 (IRQ_EP93XX_VIC0 + 12) +#define IRQ_EP93XX_DMAM2P6 (IRQ_EP93XX_VIC0 + 13) +#define IRQ_EP93XX_DMAM2P7 (IRQ_EP93XX_VIC0 + 14) +#define IRQ_EP93XX_DMAM2P8 (IRQ_EP93XX_VIC0 + 15) +#define IRQ_EP93XX_DMAM2P9 (IRQ_EP93XX_VIC0 + 16) +#define IRQ_EP93XX_DMAM2M0 (IRQ_EP93XX_VIC0 + 17) +#define IRQ_EP93XX_DMAM2M1 (IRQ_EP93XX_VIC0 + 18) +#define IRQ_EP93XX_GPIO0MUX (IRQ_EP93XX_VIC0 + 19) +#define IRQ_EP93XX_GPIO1MUX (IRQ_EP93XX_VIC0 + 20) +#define IRQ_EP93XX_GPIO2MUX (IRQ_EP93XX_VIC0 + 21) +#define IRQ_EP93XX_GPIO3MUX (IRQ_EP93XX_VIC0 + 22) +#define IRQ_EP93XX_UART1RX (IRQ_EP93XX_VIC0 + 23) +#define IRQ_EP93XX_UART1TX (IRQ_EP93XX_VIC0 + 24) +#define IRQ_EP93XX_UART2RX (IRQ_EP93XX_VIC0 + 25) +#define IRQ_EP93XX_UART2TX (IRQ_EP93XX_VIC0 + 26) +#define IRQ_EP93XX_UART3RX (IRQ_EP93XX_VIC0 + 27) +#define IRQ_EP93XX_UART3TX (IRQ_EP93XX_VIC0 + 28) +#define IRQ_EP93XX_KEY (IRQ_EP93XX_VIC0 + 29) +#define IRQ_EP93XX_TOUCH (IRQ_EP93XX_VIC0 + 30) #define EP93XX_VIC1_VALID_IRQ_MASK 0x7ffffffc -#define IRQ_EP93XX_EXT0 32 -#define IRQ_EP93XX_EXT1 33 -#define IRQ_EP93XX_EXT2 34 -#define IRQ_EP93XX_64HZ 35 -#define IRQ_EP93XX_WATCHDOG 36 -#define IRQ_EP93XX_RTC 37 -#define IRQ_EP93XX_IRDA 38 -#define IRQ_EP93XX_ETHERNET 39 -#define IRQ_EP93XX_EXT3 40 -#define IRQ_EP93XX_PROG 41 -#define IRQ_EP93XX_1HZ 42 -#define IRQ_EP93XX_VSYNC 43 -#define IRQ_EP93XX_VIDEO_FIFO 44 -#define IRQ_EP93XX_SSP1RX 45 -#define IRQ_EP93XX_SSP1TX 46 -#define IRQ_EP93XX_GPIO4MUX 47 -#define IRQ_EP93XX_GPIO5MUX 48 -#define IRQ_EP93XX_GPIO6MUX 49 -#define IRQ_EP93XX_GPIO7MUX 50 -#define IRQ_EP93XX_TIMER3 51 -#define IRQ_EP93XX_UART1 52 -#define IRQ_EP93XX_SSP 53 -#define IRQ_EP93XX_UART2 54 -#define IRQ_EP93XX_UART3 55 -#define IRQ_EP93XX_USB 56 -#define IRQ_EP93XX_ETHERNET_PME 57 -#define IRQ_EP93XX_DSP 58 -#define IRQ_EP93XX_GPIO_AB 59 -#define IRQ_EP93XX_SAI 60 +#define IRQ_EP93XX_VIC1 (IRQ_EP93XX_VIC0 + 32) + +#define IRQ_EP93XX_EXT0 (IRQ_EP93XX_VIC1 + 0) +#define IRQ_EP93XX_EXT1 (IRQ_EP93XX_VIC1 + 1) +#define IRQ_EP93XX_EXT2 (IRQ_EP93XX_VIC1 + 2) +#define IRQ_EP93XX_64HZ (IRQ_EP93XX_VIC1 + 3) +#define IRQ_EP93XX_WATCHDOG (IRQ_EP93XX_VIC1 + 4) +#define IRQ_EP93XX_RTC (IRQ_EP93XX_VIC1 + 5) +#define IRQ_EP93XX_IRDA (IRQ_EP93XX_VIC1 + 6) +#define IRQ_EP93XX_ETHERNET (IRQ_EP93XX_VIC1 + 7) +#define IRQ_EP93XX_EXT3 (IRQ_EP93XX_VIC1 + 8) +#define IRQ_EP93XX_PROG (IRQ_EP93XX_VIC1 + 9) +#define IRQ_EP93XX_1HZ (IRQ_EP93XX_VIC1 + 10) +#define IRQ_EP93XX_VSYNC (IRQ_EP93XX_VIC1 + 11) +#define IRQ_EP93XX_VIDEO_FIFO (IRQ_EP93XX_VIC1 + 12) +#define IRQ_EP93XX_SSP1RX (IRQ_EP93XX_VIC1 + 13) +#define IRQ_EP93XX_SSP1TX (IRQ_EP93XX_VIC1 + 14) +#define IRQ_EP93XX_GPIO4MUX (IRQ_EP93XX_VIC1 + 15) +#define IRQ_EP93XX_GPIO5MUX (IRQ_EP93XX_VIC1 + 16) +#define IRQ_EP93XX_GPIO6MUX (IRQ_EP93XX_VIC1 + 17) +#define IRQ_EP93XX_GPIO7MUX (IRQ_EP93XX_VIC1 + 18) +#define IRQ_EP93XX_TIMER3 (IRQ_EP93XX_VIC1 + 19) +#define IRQ_EP93XX_UART1 (IRQ_EP93XX_VIC1 + 20) +#define IRQ_EP93XX_SSP (IRQ_EP93XX_VIC1 + 21) +#define IRQ_EP93XX_UART2 (IRQ_EP93XX_VIC1 + 22) +#define IRQ_EP93XX_UART3 (IRQ_EP93XX_VIC1 + 23) +#define IRQ_EP93XX_USB (IRQ_EP93XX_VIC1 + 24) +#define IRQ_EP93XX_ETHERNET_PME (IRQ_EP93XX_VIC1 + 25) +#define IRQ_EP93XX_DSP (IRQ_EP93XX_VIC1 + 26) +#define IRQ_EP93XX_GPIO_AB (IRQ_EP93XX_VIC1 + 27) +#define IRQ_EP93XX_SAI (IRQ_EP93XX_VIC1 + 28) #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff -#define NR_EP93XX_IRQS (64 + 24) +#define NR_EP93XX_IRQS (IRQ_EP93XX_VIC1 + 32 + 24) #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x)) #define EP93XX_BOARD_IRQS 32 From patchwork Tue Apr 5 09:17:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 558490 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44C79C46467 for ; Tue, 5 Apr 2022 09:53:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350137AbiDEJzb (ORCPT ); Tue, 5 Apr 2022 05:55:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236041AbiDEJbC (ORCPT ); Tue, 5 Apr 2022 05:31:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEC2345AF7; Tue, 5 Apr 2022 02:18:24 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 747E1B81B14; Tue, 5 Apr 2022 09:18:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AD43C385A0; Tue, 5 Apr 2022 09:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649150302; bh=HRzw+3b+SBJ4FlvxvEcFyPcfDzTsM2cqwGkzYB2C7u4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s5ukYVcqWJMVjBzRd3C4y8FcxZ8QocdCvM8dUNL2JEOUYnPI1oH23ENaV1NsWa7Pq FxKNz61SFZ4rcuSE7qQB/EUWKeJ7g1YUVTxksyMR9B7vfE4T9/J7bU1t2k+SvdzVBJ bFj5SjROpA5jSI4SBSI3MLJaQBZgDjc9dX6JqlsVr+97PMkGd2s+traU/xMiSnwBKb OA392wKgwdNXDFg4uWS0pshLXedugaoZY1hTUBcgFdAkXVUeyvRky5o/PnLb+z7RiN fjbukszvmcNOgceM3/9yH/NpDRGMqY9sqlMktyucilurqGqVcOjwhNjXHbR/kvjR9J JTvqbDuOBvrZw== From: Arnd Bergmann 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 03/12] ARM: ep93xx: enable SPARSE_IRQ Date: Tue, 5 Apr 2022 11:17:41 +0200 Message-Id: <20220405091750.3076973-4-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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Arnd Bergmann 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. Cc: Hartley Sweeten Cc: Hubert Feurstein Cc: Lukasz Majewski Tested-by: Alexander Sverdlin Signed-off-by: Arnd Bergmann Tested-by: Alexander Sverdlin Acked-by: Alexander Sverdlin --- arch/arm/Kconfig | 2 ++ arch/arm/mach-ep93xx/adssphere.c | 1 + arch/arm/mach-ep93xx/core.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 + 12 files changed, 23 insertions(+), 8 deletions(-) rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (96%) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 31f024e6e925..5177e54cc14c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -358,6 +358,8 @@ config ARCH_EP93XX select CPU_ARM920T select GPIOLIB select COMMON_CLK + 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 8d5e349a7a6d..0c48d3c5b8e7 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 */ .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/core.c b/arch/arm/mach-ep93xx/core.c index e4569a5acc3f..2d58e273c96d 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -47,6 +47,7 @@ #include #include "soc.h" +#include "irqs.h" /************************************************************************* * Static I/O mappings that are needed for all EP93xx platforms diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index af0e22471ebd..4b90899a66e9 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 */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -255,6 +256,7 @@ MACHINE_END MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") /* Maintainer: George Kashperko */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -267,6 +269,7 @@ MACHINE_END MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board") /* Maintainer: Lennert Buytenhek */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -279,6 +282,7 @@ MACHINE_END MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board") /* Maintainer: Herbert Valerio Riedel */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -291,6 +295,7 @@ MACHINE_END MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board") /* Maintainer: H Hartley Sweeten */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -303,6 +308,7 @@ MACHINE_END MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board") /* Maintainer: Toufeeq Hussain */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -315,6 +321,7 @@ MACHINE_END MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board") /* Maintainer: Lennert Buytenhek */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -327,6 +334,7 @@ MACHINE_END MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") /* Maintainer: Lennert Buytenhek */ .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 d7f9890321eb..0b7043e3e178 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 */ .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 96% rename from arch/arm/mach-ep93xx/include/mach/irqs.h rename to arch/arm/mach-ep93xx/irqs.h index 60c69c4ed7e1..353201b90c66 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 @@ -77,7 +73,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 e6ead8ded6ee..c121c459aa17 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 */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -88,6 +89,7 @@ MACHINE_END MACHINE_START(MICRO9M, "Contec Micro9-Mid") /* Maintainer: Hubert Feurstein */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -100,6 +102,7 @@ MACHINE_END MACHINE_START(MICRO9L, "Contec Micro9-Lite") /* Maintainer: Hubert Feurstein */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ep93xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -112,6 +115,7 @@ MACHINE_END MACHINE_START(MICRO9S, "Contec Micro9-Slim") /* Maintainer: Hubert Feurstein */ .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 5291053023b2..569e72413561 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 e200d69471e9..1dfb725671b1 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 94ef7f275f94..f0986e288d19 100644 --- a/arch/arm/mach-ep93xx/soc.h +++ b/arch/arm/mach-ep93xx/soc.h @@ -10,6 +10,7 @@ #define _EP93XX_SOC_H #include +#include "irqs.h" /* * EP93xx Physical Memory Map: diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 12eff8c8074d..e70bac011407 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 #include #include @@ -350,6 +349,7 @@ static void __init ts72xx_init_machine(void) MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") /* Maintainer: Lennert Buytenhek */ .atag_offset = 0x100, + .nr_irqs = NR_EP93XX_IRQS, .map_io = ts72xx_map_io, .init_irq = ep93xx_init_irq, .init_time = ep93xx_timer_init, @@ -413,6 +413,7 @@ static void __init bk3_init_machine(void) MACHINE_START(BK3, "Liebherr controller BK3.1") /* Maintainer: Lukasz Majewski */ .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 e46281e60bf7..30d9cf3791eb 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 */ .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, From patchwork Tue Apr 5 09:17:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 556439 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B291C433FE for ; Tue, 5 Apr 2022 09:53:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350149AbiDEJzj (ORCPT ); Tue, 5 Apr 2022 05:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236093AbiDEJbC (ORCPT ); Tue, 5 Apr 2022 05:31:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58B5EAB; Tue, 5 Apr 2022 02:18:30 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 09F28B81BBF; Tue, 5 Apr 2022 09:18:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB253C385A6; Tue, 5 Apr 2022 09:18:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649150307; bh=7bz3/9lFuVh6UBeyajoRrHQp8fJ3tuWsYxqwUL9XLow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MdzemasPpcRVHcsYcZB862RJF3oi/0MUX3sF8g6zofH5KtbGNamY8KXBIXdD+lVvu hCqN9ILnauBlXEobsF+MtOlREhVk9UB9sVFHTVIogKQ4JY78BzxxsC9NHGRB8p5D5L WsfKgBz7VRvgTzcEi19R16cXvOb6gEGG73+bgNJKoRQ09voQ7U3oeTnacCsGiIakvl 4LB+tz3rJGq3TApbKnVSHrmzH6a7vIEKkkUKopN0ZDizh9wHvhmcNQ2ZJfVcvJP4Li P1L/DojopvMD6vvAyaQJr8eKyQt+pDJPJdEd9H0BYqKEwnUERtZ4sFlNRhni2l9pp9 FgKsZecnF29Jg== From: Arnd Bergmann 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 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local Date: Tue, 5 Apr 2022 11:17:42 +0200 Message-Id: <20220405091750.3076973-5-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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Arnd Bergmann Nothing relies on it outside of arch/arm/mach-ep93xx/, so just move it there. Cc: Hartley Sweeten Tested-by: Alexander Sverdlin Signed-off-by: Arnd Bergmann Reviewed-by: Lukasz Majewski Acked-by: Alexander Sverdlin --- arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h | 4 ---- arch/arm/mach-ep93xx/gpio-ep93xx.h | 2 +- arch/arm/mach-ep93xx/include/mach/uncompress.h | 1 - arch/arm/mach-ep93xx/soc.h | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) rename arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h (94%) diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/ep93xx-regs.h similarity index 94% rename from arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h rename to arch/arm/mach-ep93xx/ep93xx-regs.h index 6839ea032e58..8fa3646de0a4 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/ep93xx-regs.h @@ -1,8 +1,4 @@ /* SPDX-License-Identifier: GPL-2.0 */ -/* - * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h - */ - #ifndef __ASM_ARCH_EP93XX_REGS_H #define __ASM_ARCH_EP93XX_REGS_H diff --git a/arch/arm/mach-ep93xx/gpio-ep93xx.h b/arch/arm/mach-ep93xx/gpio-ep93xx.h index 242af4a401ea..7b46eb7e5507 100644 --- a/arch/arm/mach-ep93xx/gpio-ep93xx.h +++ b/arch/arm/mach-ep93xx/gpio-ep93xx.h @@ -4,7 +4,7 @@ #ifndef __GPIO_EP93XX_H #define __GPIO_EP93XX_H -#include +#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 */ -#include #include static unsigned char __raw_readb(unsigned int ptr) diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h index f0986e288d19..3245ebbd5069 100644 --- a/arch/arm/mach-ep93xx/soc.h +++ b/arch/arm/mach-ep93xx/soc.h @@ -9,7 +9,7 @@ #ifndef _EP93XX_SOC_H #define _EP93XX_SOC_H -#include +#include "ep93xx-regs.h" #include "irqs.h" /* From patchwork Tue Apr 5 09:17:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 556436 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B895C433EF for ; Tue, 5 Apr 2022 10:04:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350206AbiDEJ4V (ORCPT ); Tue, 5 Apr 2022 05:56:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236135AbiDEJbN (ORCPT ); Tue, 5 Apr 2022 05:31:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4CFF26FA; Tue, 5 Apr 2022 02:18:35 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 65FAEB81B62; Tue, 5 Apr 2022 09:18:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 200F6C385AC; Tue, 5 Apr 2022 09:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649150313; bh=J6wtCACpXBxLmkz/EnCKwxs03UNfKLPJWoTIRgLakyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sbF8ZztCBrqYcjuwKSVQCiU3VGjPjEz3Tye5ptnnpKrxGhc8riDbmT+V8Oq5SZGyy dEzr2RGLAXRp5rN636zq2zXhCJIUbvm3fYB2A68PY9RufYkgdmj7D+7BymNlCCdZs/ eRzM5C760LUirkjJvrgnDwVWGShrPVJiFvQyYVJVIMmZ6OwMk6KcDI/LpW5G4kU8dt d/kbIFqmxXff97E9GGvcxxcBTFZW5GhgosYEaOtAkKeE/lO4gTG5hb6WUjfEPTsSTc Q2N8r2QLLzL8A9Xmr0B7IPyd5oddNm1Oasj71bxHcpZDtlJ/XhJBYFQpbLBaa/3ST9 xzLnDaOFom/Ew== From: Arnd Bergmann 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 05/12] ARM: ep93xx: multiplatform support Date: Tue, 5 Apr 2022 11:17:43 +0200 Message-Id: <20220405091750.3076973-6-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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Arnd Bergmann With the clock support and the interrupts out of the way, ep93xx can be compiled into the same kernel image as the other ARMv4/v5 platforms. The last obstacle are the two workarounds for broken boot loaders that require us to re-initialize the ethernet controller and/or the watchdog on certain machines. Move this code into the decompressor sources directly, checking for each possibly affected machine individually. Signed-off-by: Arnd Bergmann Reviewed-by: Lukasz Majewski Tested-by: Alexander Sverdlin Acked-by: Alexander Sverdlin --- arch/arm/Kconfig | 16 ----- .../compressed/misc-ep93xx.h} | 69 +++++++++---------- arch/arm/boot/compressed/misc.c | 4 ++ arch/arm/configs/ep93xx_defconfig | 2 + arch/arm/mach-ep93xx/Kconfig | 12 ++++ 5 files changed, 51 insertions(+), 52 deletions(-) rename arch/arm/{mach-ep93xx/include/mach/uncompress.h => boot/compressed/misc-ep93xx.h} (51%) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5177e54cc14c..2bd611beefe1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -347,22 +347,6 @@ config ARCH_MULTIPLATFORM select SPARSE_IRQ select USE_OF -config ARCH_EP93XX - bool "EP93xx-based" - select ARCH_SPARSEMEM_ENABLE - select ARM_AMBA - imply ARM_PATCH_PHYS_VIRT - select ARM_VIC - select AUTO_ZRELADDR - select CLKSRC_MMIO - select CPU_ARM920T - select GPIOLIB - select COMMON_CLK - select IRQ_DOMAIN - select SPARSE_IRQ - help - This enables support for the Cirrus EP93xx series of CPUs. - config ARCH_FOOTBRIDGE bool "FootBridge" select CPU_SA110 diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/boot/compressed/misc-ep93xx.h similarity index 51% rename from arch/arm/mach-ep93xx/include/mach/uncompress.h rename to arch/arm/boot/compressed/misc-ep93xx.h index e20bcab702b2..3dc942589cba 100644 --- a/arch/arm/mach-ep93xx/include/mach/uncompress.h +++ b/arch/arm/boot/compressed/misc-ep93xx.h @@ -1,54 +1,25 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* - * arch/arm/mach-ep93xx/include/mach/uncompress.h - * * Copyright (C) 2006 Lennert Buytenhek */ #include -static unsigned char __raw_readb(unsigned int ptr) -{ - return *((volatile unsigned char *)ptr); -} - -static unsigned int __raw_readl(unsigned int ptr) +static inline unsigned int __raw_readl(unsigned int ptr) { return *((volatile unsigned int *)ptr); } -static void __raw_writeb(unsigned char value, unsigned int ptr) +static inline void __raw_writeb(unsigned char value, unsigned int ptr) { *((volatile unsigned char *)ptr) = value; } -static void __raw_writel(unsigned int value, unsigned int ptr) +static inline void __raw_writel(unsigned int value, unsigned int ptr) { *((volatile unsigned int *)ptr) = value; } -#define PHYS_UART_DATA (CONFIG_DEBUG_UART_PHYS + 0x00) -#define PHYS_UART_FLAG (CONFIG_DEBUG_UART_PHYS + 0x18) -#define UART_FLAG_TXFF 0x20 - -static inline void putc(int c) -{ - int i; - - for (i = 0; i < 10000; i++) { - /* Transmit fifo not full? */ - if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF)) - break; - } - - __raw_writeb(c, PHYS_UART_DATA); -} - -static inline void flush(void) -{ -} - - /* * Some bootloaders don't turn off DMA from the ethernet MAC before * jumping to linux, which means that we might end up with bits of RX @@ -58,7 +29,7 @@ static inline void flush(void) #define PHYS_ETH_SELF_CTL 0x80010020 #define ETH_SELF_CTL_RESET 0x00000001 -static void ethernet_reset(void) +static inline void ep93xx_ethernet_reset(void) { unsigned int v; @@ -75,15 +46,41 @@ static void ethernet_reset(void) #define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000 #define TS72XX_WDT_FEED_VAL 0x05 -static void __maybe_unused ts72xx_watchdog_disable(void) +static inline void __maybe_unused ts72xx_watchdog_disable(void) { __raw_writeb(TS72XX_WDT_FEED_VAL, TS72XX_WDT_FEED_PHYS_BASE); __raw_writeb(0, TS72XX_WDT_CONTROL_PHYS_BASE); } -static void arch_decomp_setup(void) +static inline void ep93xx_decomp_setup(void) { if (machine_is_ts72xx()) ts72xx_watchdog_disable(); - ethernet_reset(); + + if (machine_is_adssphere() || + machine_is_edb9301() || + machine_is_edb9302() || + machine_is_edb9302a() || + machine_is_edb9302a() || + machine_is_edb9307() || + machine_is_edb9307a() || + machine_is_edb9307a() || + machine_is_edb9312() || + machine_is_edb9315() || + machine_is_edb9315a() || + machine_is_edb9315a() || + machine_is_gesbc9312() || + machine_is_micro9() || + machine_is_micro9l() || + machine_is_micro9m() || + machine_is_micro9s() || + machine_is_micro9m() || + machine_is_micro9l() || + machine_is_micro9s() || + machine_is_sim_one() || + machine_is_snapper_cl15() || + machine_is_ts72xx() || + machine_is_bk3() || + machine_is_vision_ep9307()) + ep93xx_ethernet_reset(); } diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index c3c66ff2d696..cb2e069dc73f 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -23,6 +23,7 @@ unsigned int __machine_arch_type; #include #include #include "misc.h" +#include "misc-ep93xx.h" static void putstr(const char *ptr); @@ -143,6 +144,9 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, free_mem_end_ptr = free_mem_ptr_end_p; __machine_arch_type = arch_id; +#ifdef CONFIG_ARCH_EP93XX + ep93xx_decomp_setup(); +#endif arch_decomp_setup(); putstr("Uncompressing Linux..."); diff --git a/arch/arm/configs/ep93xx_defconfig b/arch/arm/configs/ep93xx_defconfig index 88d5ecc2121e..fef802b7af8c 100644 --- a/arch/arm/configs/ep93xx_defconfig +++ b/arch/arm/configs/ep93xx_defconfig @@ -11,6 +11,8 @@ CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_PARTITION_ADVANCED=y +CONFIG_ARCH_MULTI_V4T=y +# CONFIG_ARCH_MULTI_V7 is not set CONFIG_ARCH_EP93XX=y CONFIG_MACH_ADSSPHERE=y CONFIG_MACH_EDB9301=y diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index 15c68a646d51..aa502ab57404 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig @@ -1,4 +1,16 @@ # SPDX-License-Identifier: GPL-2.0-only +menuconfig ARCH_EP93XX + bool "EP93xx-based" + depends on ARCH_MULTI_V4T + select ARCH_SPARSEMEM_ENABLE + select ARM_AMBA + select ARM_VIC + select CLKSRC_MMIO + select CPU_ARM920T + select GPIOLIB + help + This enables support for the Cirrus EP93xx series of CPUs. + if ARCH_EP93XX menu "Cirrus EP93xx Implementation Options" From patchwork Tue Apr 5 09:17:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 558486 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77B3EC47080 for ; Tue, 5 Apr 2022 10:04:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350220AbiDEJ43 (ORCPT ); Tue, 5 Apr 2022 05:56:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236210AbiDEJbN (ORCPT ); Tue, 5 Apr 2022 05:31:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBAD76437; Tue, 5 Apr 2022 02:18:39 -0700 (PDT) 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 56C2861645; Tue, 5 Apr 2022 09:18:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C77AC385A7; Tue, 5 Apr 2022 09:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649150318; bh=w8WO3r1/6EvuoSLPQGBL9Us7xTBObOlHCa40AeXtIeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rqBg3o8zToypF97gy4CjO10o8frcXxeLLjvkd3R7JshwyzFjX3z891APWKWfN4sly T9hfedvmirq5B04qZHDp2J6U01Wd7QGv5SdLcZ2C1+PdaTYZpNIyhK87PGsM3GhFQK xOej3YV44ze7bB3PWJ5UvycQuMWCKhMsOcwPjQVqvPUDr+MqEDhApCb6jhGfK00hAE 1YXcpmD18TaPIIcR4F/0i0vc4gMWDj7RYzDU67//ZmDjpceunfuQE3vakSp52t4eHQ nuwvVtRL4in/h4DI+1s+MH6V4eGNDY6oXnAzPWMr37N9aL2KEPI13U8CQgsNfyP0ZA jKC/r0v9HgwpA== From: Arnd Bergmann 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, Jason Cooper Subject: [PATCH 06/12] ARM: dove: multiplatform support Date: Tue, 5 Apr 2022 11:17:44 +0200 Message-Id: <20220405091750.3076973-7-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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Arnd Bergmann The dove platform is now ready to be enabled for multiplatform support, this patch does the switch over by modifying the Kconfig file, the defconfig and removing the last mach/*.h header that becomes obsolete with this. This work was originally done in 2015 as all the ARMv7 machiens gove moved over to multiplatform builds, but at the time it conflicted with some patches that Russell was trying to upstream, so we left it at that. I hope that there is no longer a need to keep dove separate from the rest, so we can either add it to the other ARMv7 platforms, or just replace it with the DT based platform code for the same hardware in mach-mvebu and remove mach-dove entirely. Acked-by: Andrew Lunn Cc: Russell King Cc: Jason Cooper Cc: Sebastian Hesselbarth Cc: Gregory Clement Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 14 -------- arch/arm/configs/dove_defconfig | 2 ++ arch/arm/mach-dove/Kconfig | 16 ++++++--- arch/arm/mach-dove/Makefile | 2 ++ arch/arm/mach-dove/include/mach/uncompress.h | 34 -------------------- 5 files changed, 16 insertions(+), 52 deletions(-) delete mode 100644 arch/arm/mach-dove/include/mach/uncompress.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2bd611beefe1..faf696173af7 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -383,20 +383,6 @@ config ARCH_IXP4XX help Support for Intel's IXP4XX (XScale) family of processors. -config ARCH_DOVE - bool "Marvell Dove" - select CPU_PJ4 - select GPIOLIB - select HAVE_PCI - select MVEBU_MBUS - select PINCTRL - select PINCTRL_DOVE - select PLAT_ORION_LEGACY - select SPARSE_IRQ - select PM_GENERIC_DOMAINS if PM - help - Support for the Marvell Dove SoC 88AP510 - config ARCH_PXA bool "PXA2xx/PXA3xx-based" select ARCH_MTD_XIP diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig index 33074fdab2ea..f8fb4758f80d 100644 --- a/arch/arm/configs/dove_defconfig +++ b/arch/arm/configs/dove_defconfig @@ -8,6 +8,8 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_PARTITION_ADVANCED=y +# CONFIG_ARCH_MULTI_V6 is not set +CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_DOVE=y CONFIG_MACH_DOVE_DB=y CONFIG_MACH_CM_A510=y diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig index 7747fe64420a..c30c69c664ea 100644 --- a/arch/arm/mach-dove/Kconfig +++ b/arch/arm/mach-dove/Kconfig @@ -1,7 +1,17 @@ # SPDX-License-Identifier: GPL-2.0 -if ARCH_DOVE +menuconfig ARCH_DOVE + bool "Marvell Dove" if ARCH_MULTI_V7 + select CPU_PJ4 + select GPIOLIB + select MVEBU_MBUS + select PINCTRL + select PINCTRL_DOVE + select PLAT_ORION_LEGACY + select PM_GENERIC_DOMAINS if PM + help + Support for the Marvell Dove SoC 88AP510 -menu "Marvell Dove Implementations" +if ARCH_DOVE config DOVE_LEGACY bool @@ -21,6 +31,4 @@ config MACH_CM_A510 Say 'Y' here if you want your kernel to support the CompuLab CM-A510 Board. -endmenu - endif diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile index cdf163cab738..e83f6492834d 100644 --- a/arch/arm/mach-dove/Makefile +++ b/arch/arm/mach-dove/Makefile @@ -1,4 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include + obj-y += common.o obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o obj-$(CONFIG_PCI) += pcie.o diff --git a/arch/arm/mach-dove/include/mach/uncompress.h b/arch/arm/mach-dove/include/mach/uncompress.h deleted file mode 100644 index ddf873f35e2b..000000000000 --- a/arch/arm/mach-dove/include/mach/uncompress.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#define UART0_PHYS_BASE (0xf1000000 + 0x12000) - -#define UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0)) -#define UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14)) - -#define LSR_THRE 0x20 - -static inline void putc(const char c) -{ - int i; - - for (i = 0; i < 0x1000; i++) { - /* Transmit fifo not full? */ - if (*UART_LSR & LSR_THRE) - break; - } - - *UART_THR = c; -} - -static inline void flush(void) -{ -} - -/* - * nothing to do - */ -#define arch_decomp_setup() From patchwork Tue Apr 5 09:17:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 556441 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5AF0C4167B for ; Tue, 5 Apr 2022 09:53:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350123AbiDEJzS (ORCPT ); Tue, 5 Apr 2022 05:55:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236229AbiDEJbN (ORCPT ); Tue, 5 Apr 2022 05:31:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D562FE20; Tue, 5 Apr 2022 02:18:46 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 624B3B81B7F; Tue, 5 Apr 2022 09:18:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35910C385A9; Tue, 5 Apr 2022 09:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649150324; bh=5kt1dppe+8wUuxiuygv88y2CPW/Cqw3zsgWm2dxOFr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z80kkFcSxfV5dtas7PwORryjeVdA+Jn2fzj1FMwcyzGU0LQeP00S+GmO0hkSres/e hqX3L/oYwdHULZseN7cqSsFWDLDNo6rN1CbucAcIhhIJ3p0RGk1HNu2AYn9k+jMifE GaVGy2BRncSyuAAZOPVuw/GpI9+88rTG9R5m5Xk1LLBI5/lMEK6zAQ3vkrZTJetOFM i0OnZbmry5qdHPi6LlOjBCT+2dEgcKp8TF9CtwNdjjszOn/aZ8XPzviVGfiQbFWMFk MME8se15teRx7qaOgm7fEXkyR0Kgtdg3w216bXsdd1YLsYw41TX/sNHJAsDBxRrGXl Llk5pWF+qKbkg== From: Arnd Bergmann 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 07/12] ARM: s3c24xx: remove support for ISA drivers on BAST PC/104 Date: Tue, 5 Apr 2022 11:17:45 +0200 Message-Id: <20220405091750.3076973-8-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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Arnd Bergmann BAST is the one machine that theoretically supports unmodified ISA drivers for hardware on its PC/104 connector, using a custom version of the inb()/outb() and inw()/outw() macros. This is incompatible with the generic version used in asm/io.h, and can't easily be used in a multiplatform kernel. Removing the special case for 16-bit I/O port access on BAST gets us closer to multiplatform, at the expense of any PC/104 users with 16-bit cards having to either use an older kernel or modify their ISA drivers to manually ioremap() the area and use readw()/write() in place of inw()/outw(). Either way is probably ok, given that all of s3c24xx is already on the way out next year, and many traditional ISA drivers are already gone. Machines other than BAST already have no support for ISA drivers, though a couple of them do map one of the external chip-selects into the ISA port range, using the same address for 8-bit and 16-bit I/O. It is unlikely that anything actually uses this mapping, but it's also easy to keep this working by mapping it to the normal platform-independent PCI I/O base that is otherwise unused on s3c24xx. The mach/map-base.h file is no longer referenced in global headers and can be moved into the platform directory. Signed-off-by: Arnd Bergmann Acked-by: Krzysztof Kozlowski --- arch/arm/Kconfig | 1 - arch/arm/mach-s3c/Kconfig.s3c24xx | 1 - arch/arm/mach-s3c/cpu.c | 2 +- arch/arm/mach-s3c/include/mach/io-s3c24xx.h | 50 ------------------- arch/arm/mach-s3c/include/mach/io.h | 8 --- arch/arm/mach-s3c/irq-pm-s3c24xx.c | 2 +- arch/arm/mach-s3c/mach-anubis.c | 5 -- arch/arm/mach-s3c/mach-bast.c | 5 -- arch/arm/mach-s3c/mach-osiris.c | 5 -- arch/arm/mach-s3c/mach-rx3715.c | 6 --- arch/arm/mach-s3c/mach-smdk2416.c | 10 ---- arch/arm/mach-s3c/mach-smdk2440.c | 10 ---- arch/arm/mach-s3c/mach-smdk2443.c | 10 ---- arch/arm/mach-s3c/mach-vr1000.c | 5 -- .../mach-s3c/{include/mach => }/map-base.h | 6 +++ arch/arm/mach-s3c/map-s3c24xx.h | 2 +- arch/arm/mach-s3c/map-s3c64xx.h | 2 +- 17 files changed, 10 insertions(+), 120 deletions(-) delete mode 100644 arch/arm/mach-s3c/include/mach/io-s3c24xx.h delete mode 100644 arch/arm/mach-s3c/include/mach/io.h rename arch/arm/mach-s3c/{include/mach => }/map-base.h (87%) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index faf696173af7..2242d2ae8854 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -444,7 +444,6 @@ config ARCH_S3C24XX select CLKSRC_SAMSUNG_PWM select GPIO_SAMSUNG select GPIOLIB - select NEED_MACH_IO_H select S3C2410_WATCHDOG select SAMSUNG_ATAGS select USE_OF diff --git a/arch/arm/mach-s3c/Kconfig.s3c24xx b/arch/arm/mach-s3c/Kconfig.s3c24xx index 000e3e234f71..d47df6427e89 100644 --- a/arch/arm/mach-s3c/Kconfig.s3c24xx +++ b/arch/arm/mach-s3c/Kconfig.s3c24xx @@ -181,7 +181,6 @@ config MACH_AML_M5900 config ARCH_BAST bool "Simtec Electronics BAST (EB2410ITX)" - select ISA select MACH_BAST_IDE select S3C2410_COMMON_DCLK select S3C2410_IOTIMING if ARM_S3C2410_CPUFREQ diff --git a/arch/arm/mach-s3c/cpu.c b/arch/arm/mach-s3c/cpu.c index 6e9772555f0d..05a6b4be1768 100644 --- a/arch/arm/mach-s3c/cpu.c +++ b/arch/arm/mach-s3c/cpu.c @@ -10,7 +10,7 @@ #include #include -#include +#include "map-base.h" #include "cpu.h" unsigned long samsung_cpu_id; diff --git a/arch/arm/mach-s3c/include/mach/io-s3c24xx.h b/arch/arm/mach-s3c/include/mach/io-s3c24xx.h deleted file mode 100644 index 738b775d3336..000000000000 --- a/arch/arm/mach-s3c/include/mach/io-s3c24xx.h +++ /dev/null @@ -1,50 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * arch/arm/mach-s3c2410/include/mach/io.h - * from arch/arm/mach-rpc/include/mach/io.h - * - * Copyright (C) 1997 Russell King - * (C) 2003 Simtec Electronics -*/ - -#ifndef __ASM_ARM_ARCH_IO_S3C24XX_H -#define __ASM_ARM_ARCH_IO_S3C24XX_H - -#include - -/* - * ISA style IO, for each machine to sort out mappings for, - * if it implements it. We reserve two 16M regions for ISA, - * so the PC/104 can use separate addresses for 8-bit and - * 16-bit port I/O. - */ -#define PCIO_BASE S3C_ADDR(0x02000000) -#define IO_SPACE_LIMIT 0x00ffffff -#define S3C24XX_VA_ISA_WORD (PCIO_BASE) -#define S3C24XX_VA_ISA_BYTE (PCIO_BASE + 0x01000000) - -#ifdef CONFIG_ISA - -#define inb(p) readb(S3C24XX_VA_ISA_BYTE + (p)) -#define inw(p) readw(S3C24XX_VA_ISA_WORD + (p)) -#define inl(p) readl(S3C24XX_VA_ISA_WORD + (p)) - -#define outb(v,p) writeb((v), S3C24XX_VA_ISA_BYTE + (p)) -#define outw(v,p) writew((v), S3C24XX_VA_ISA_WORD + (p)) -#define outl(v,p) writel((v), S3C24XX_VA_ISA_WORD + (p)) - -#define insb(p,d,l) readsb(S3C24XX_VA_ISA_BYTE + (p),d,l) -#define insw(p,d,l) readsw(S3C24XX_VA_ISA_WORD + (p),d,l) -#define insl(p,d,l) readsl(S3C24XX_VA_ISA_WORD + (p),d,l) - -#define outsb(p,d,l) writesb(S3C24XX_VA_ISA_BYTE + (p),d,l) -#define outsw(p,d,l) writesw(S3C24XX_VA_ISA_WORD + (p),d,l) -#define outsl(p,d,l) writesl(S3C24XX_VA_ISA_WORD + (p),d,l) - -#else - -#define __io(x) (PCIO_BASE + (x)) - -#endif - -#endif diff --git a/arch/arm/mach-s3c/include/mach/io.h b/arch/arm/mach-s3c/include/mach/io.h deleted file mode 100644 index 30a0135708dc..000000000000 --- a/arch/arm/mach-s3c/include/mach/io.h +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (c) 2020 Krzysztof Kozlowski - */ - -#ifdef CONFIG_ARCH_S3C24XX -#include "io-s3c24xx.h" -#endif diff --git a/arch/arm/mach-s3c/irq-pm-s3c24xx.c b/arch/arm/mach-s3c/irq-pm-s3c24xx.c index 4d5e28312d91..55f41135ad70 100644 --- a/arch/arm/mach-s3c/irq-pm-s3c24xx.c +++ b/arch/arm/mach-s3c/irq-pm-s3c24xx.c @@ -15,7 +15,7 @@ #include "cpu.h" #include "pm.h" -#include +#include "map-base.h" #include "map-s3c.h" #include "regs-irq.h" diff --git a/arch/arm/mach-s3c/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c index 04147cc0adcc..60df40052209 100644 --- a/arch/arm/mach-s3c/mach-anubis.c +++ b/arch/arm/mach-s3c/mach-anubis.c @@ -57,11 +57,6 @@ static struct map_desc anubis_iodesc[] __initdata = { .pfn = __phys_to_pfn(0x0), .length = SZ_4M, .type = MT_DEVICE, - }, { - .virtual = (u32)S3C24XX_VA_ISA_WORD, - .pfn = __phys_to_pfn(0x0), - .length = SZ_4M, - .type = MT_DEVICE, }, /* we could possibly compress the next set down into a set of smaller tables diff --git a/arch/arm/mach-s3c/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c index 27e8d5950228..5ac24e406157 100644 --- a/arch/arm/mach-s3c/mach-bast.c +++ b/arch/arm/mach-s3c/mach-bast.c @@ -75,11 +75,6 @@ static struct map_desc bast_iodesc[] __initdata = { .pfn = PA_CS2(BAST_PA_ISAIO), .length = SZ_16M, .type = MT_DEVICE, - }, { - .virtual = (u32)S3C24XX_VA_ISA_WORD, - .pfn = PA_CS3(BAST_PA_ISAIO), - .length = SZ_16M, - .type = MT_DEVICE, }, /* bast CPLD control registers, and external interrupt controls */ { diff --git a/arch/arm/mach-s3c/mach-osiris.c b/arch/arm/mach-s3c/mach-osiris.c index 3aefb9d22340..8387773f4fd4 100644 --- a/arch/arm/mach-s3c/mach-osiris.c +++ b/arch/arm/mach-s3c/mach-osiris.c @@ -58,11 +58,6 @@ static struct map_desc osiris_iodesc[] __initdata = { .pfn = __phys_to_pfn(S3C2410_CS5), .length = SZ_16M, .type = MT_DEVICE, - }, { - .virtual = (u32)S3C24XX_VA_ISA_WORD, - .pfn = __phys_to_pfn(S3C2410_CS5), - .length = SZ_16M, - .type = MT_DEVICE, }, /* CPLD control registers */ diff --git a/arch/arm/mach-s3c/mach-rx3715.c b/arch/arm/mach-s3c/mach-rx3715.c index 9fd2d9dc3689..586cb0fdfce0 100644 --- a/arch/arm/mach-s3c/mach-rx3715.c +++ b/arch/arm/mach-s3c/mach-rx3715.c @@ -48,13 +48,7 @@ static struct map_desc rx3715_iodesc[] __initdata = { /* dump ISA space somewhere unused */ - { - .virtual = (u32)S3C24XX_VA_ISA_WORD, - .pfn = __phys_to_pfn(S3C2410_CS3), - .length = SZ_1M, - .type = MT_DEVICE, - }, { .virtual = (u32)S3C24XX_VA_ISA_BYTE, .pfn = __phys_to_pfn(S3C2410_CS3), .length = SZ_1M, diff --git a/arch/arm/mach-s3c/mach-smdk2416.c b/arch/arm/mach-s3c/mach-smdk2416.c index 4d883a792cc6..38b4a7cd4178 100644 --- a/arch/arm/mach-s3c/mach-smdk2416.c +++ b/arch/arm/mach-s3c/mach-smdk2416.c @@ -53,16 +53,6 @@ static struct map_desc smdk2416_iodesc[] __initdata = { /* ISA IO Space map (memory space selected by A24) */ { - .virtual = (u32)S3C24XX_VA_ISA_WORD, - .pfn = __phys_to_pfn(S3C2410_CS2), - .length = 0x10000, - .type = MT_DEVICE, - }, { - .virtual = (u32)S3C24XX_VA_ISA_WORD + 0x10000, - .pfn = __phys_to_pfn(S3C2410_CS2 + (1<<24)), - .length = SZ_4M, - .type = MT_DEVICE, - }, { .virtual = (u32)S3C24XX_VA_ISA_BYTE, .pfn = __phys_to_pfn(S3C2410_CS2), .length = 0x10000, diff --git a/arch/arm/mach-s3c/mach-smdk2440.c b/arch/arm/mach-s3c/mach-smdk2440.c index 7f6fe0db04f3..392554b1eba2 100644 --- a/arch/arm/mach-s3c/mach-smdk2440.c +++ b/arch/arm/mach-s3c/mach-smdk2440.c @@ -43,16 +43,6 @@ static struct map_desc smdk2440_iodesc[] __initdata = { /* ISA IO Space map (memory space selected by A24) */ { - .virtual = (u32)S3C24XX_VA_ISA_WORD, - .pfn = __phys_to_pfn(S3C2410_CS2), - .length = 0x10000, - .type = MT_DEVICE, - }, { - .virtual = (u32)S3C24XX_VA_ISA_WORD + 0x10000, - .pfn = __phys_to_pfn(S3C2410_CS2 + (1<<24)), - .length = SZ_4M, - .type = MT_DEVICE, - }, { .virtual = (u32)S3C24XX_VA_ISA_BYTE, .pfn = __phys_to_pfn(S3C2410_CS2), .length = 0x10000, diff --git a/arch/arm/mach-s3c/mach-smdk2443.c b/arch/arm/mach-s3c/mach-smdk2443.c index fc54c91ade56..4c541a03e49e 100644 --- a/arch/arm/mach-s3c/mach-smdk2443.c +++ b/arch/arm/mach-s3c/mach-smdk2443.c @@ -40,16 +40,6 @@ static struct map_desc smdk2443_iodesc[] __initdata = { /* ISA IO Space map (memory space selected by A24) */ { - .virtual = (u32)S3C24XX_VA_ISA_WORD, - .pfn = __phys_to_pfn(S3C2410_CS2), - .length = 0x10000, - .type = MT_DEVICE, - }, { - .virtual = (u32)S3C24XX_VA_ISA_WORD + 0x10000, - .pfn = __phys_to_pfn(S3C2410_CS2 + (1<<24)), - .length = SZ_4M, - .type = MT_DEVICE, - }, { .virtual = (u32)S3C24XX_VA_ISA_BYTE, .pfn = __phys_to_pfn(S3C2410_CS2), .length = 0x10000, diff --git a/arch/arm/mach-s3c/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c index 5c3d07cf2e79..3aa8c707f8a2 100644 --- a/arch/arm/mach-s3c/mach-vr1000.c +++ b/arch/arm/mach-s3c/mach-vr1000.c @@ -67,11 +67,6 @@ static struct map_desc vr1000_iodesc[] __initdata = { .pfn = PA_CS2(BAST_PA_ISAIO), .length = SZ_16M, .type = MT_DEVICE, - }, { - .virtual = (u32)S3C24XX_VA_ISA_WORD, - .pfn = PA_CS3(BAST_PA_ISAIO), - .length = SZ_16M, - .type = MT_DEVICE, }, /* CPLD control registers, and external interrupt controls */ diff --git a/arch/arm/mach-s3c/include/mach/map-base.h b/arch/arm/mach-s3c/map-base.h similarity index 87% rename from arch/arm/mach-s3c/include/mach/map-base.h rename to arch/arm/mach-s3c/map-base.h index 34b39ded0e2e..463a995b399b 100644 --- a/arch/arm/mach-s3c/include/mach/map-base.h +++ b/arch/arm/mach-s3c/map-base.h @@ -33,6 +33,12 @@ #define S3C_VA_WATCHDOG S3C_ADDR(0x00400000) /* watchdog */ #define S3C_VA_UART S3C_ADDR(0x01000000) /* UART */ +/* ISA device mapping for BAST to use with inb()/outb() on 8-bit I/O. + * 16-bit I/O on BAST now requires driver modifications to manually + * ioremap CS3. + */ +#define S3C24XX_VA_ISA_BYTE PCI_IOBASE + /* This is used for the CPU specific mappings that may be needed, so that * they do not need to directly used S3C_ADDR() and thus make it easier to * modify the space for mapping. diff --git a/arch/arm/mach-s3c/map-s3c24xx.h b/arch/arm/mach-s3c/map-s3c24xx.h index b5dba78a9dd7..f8d075b11d6f 100644 --- a/arch/arm/mach-s3c/map-s3c24xx.h +++ b/arch/arm/mach-s3c/map-s3c24xx.h @@ -9,7 +9,7 @@ #ifndef __ASM_ARCH_MAP_H #define __ASM_ARCH_MAP_H -#include +#include "map-base.h" #include "map-s3c.h" /* diff --git a/arch/arm/mach-s3c/map-s3c64xx.h b/arch/arm/mach-s3c/map-s3c64xx.h index d7740d2a77c4..9de1c58bcb06 100644 --- a/arch/arm/mach-s3c/map-s3c64xx.h +++ b/arch/arm/mach-s3c/map-s3c64xx.h @@ -11,7 +11,7 @@ #ifndef __ASM_ARCH_MAP_H #define __ASM_ARCH_MAP_H __FILE__ -#include +#include "map-base.h" #include "map-s3c.h" /* From patchwork Tue Apr 5 09:17:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 556438 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25872C41535 for ; Tue, 5 Apr 2022 09:53:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350135AbiDEJz1 (ORCPT ); Tue, 5 Apr 2022 05:55:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236284AbiDEJbO (ORCPT ); Tue, 5 Apr 2022 05:31:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A48FB24BD3; Tue, 5 Apr 2022 02:18:50 -0700 (PDT) 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 3129361654; Tue, 5 Apr 2022 09:18:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E5B3C385A0; Tue, 5 Apr 2022 09:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649150329; bh=z96vxEiwP1b5sZF7dgUcgoEbuYgbb8uvtvAVuuKNgPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sy1mCzdMdvm9zHtJ2BcGP4AS2ItnMeWkD82ANJeGFxq8QqF2CvpnF3jUc2+UowXZy ZVr1IT+YXHminOM73W11fVdhzPj3655Mgz83Tv+j/a/UCcTDSzcM/JwgSj6BkBwmkA Z5LlxRi7KKDOYmb00eTDx7kDyKZLAhNKpMwl96bmG7Fn87BNDEGggjN9ipWCBswOta zFbH7vU5ZYxfJ95u3w3CJMn2xAzpDpd8avcouHvDe+UGYbFyqd3ajJm/8vQX1icOLk kker9LNWgRF3NLbv5d3auPRvP9dUG3CaLG49ZQhWswkfNy9QqrKWQzztTSzU/WLCxc TZs3dZzkVuA+g== From: Arnd Bergmann 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 08/12] ARM: s3c24xx: convert to sparse-irq Date: Tue, 5 Apr 2022 11:17:46 +0200 Message-Id: <20220405091750.3076973-9-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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Arnd Bergmann As a final bit of preparation for converting to ARCH_MULTIPLATFORM, change the interrupt handling for s3c24xx to use sparse IRQs. Since the number of possible interrupts is already fixed and relatively small per chip, just make it use all legacy interrupts preallocated using the .nr_irqs field in the machine descriptor, rather than actually allocating domains on the fly. Signed-off-by: Arnd Bergmann Acked-by: Krzysztof Kozlowski --- arch/arm/Kconfig | 2 ++ arch/arm/mach-s3c/bast-ide.c | 2 +- arch/arm/mach-s3c/bast-irq.c | 2 +- arch/arm/mach-s3c/dev-audio-s3c64xx.c | 2 +- arch/arm/mach-s3c/dev-uart-s3c64xx.c | 2 +- arch/arm/mach-s3c/devs.c | 2 +- arch/arm/mach-s3c/gpio-samsung.c | 2 +- arch/arm/mach-s3c/irq-s3c24xx.c | 2 +- .../mach-s3c/{include/mach => }/irqs-s3c24xx.h | 18 ++++++++++++------ .../mach-s3c/{include/mach => }/irqs-s3c64xx.h | 0 arch/arm/mach-s3c/{include/mach => }/irqs.h | 0 arch/arm/mach-s3c/mach-amlm5900.c | 2 ++ arch/arm/mach-s3c/mach-anubis.c | 1 + arch/arm/mach-s3c/mach-anw6410.c | 2 +- arch/arm/mach-s3c/mach-at2440evb.c | 1 + arch/arm/mach-s3c/mach-bast.c | 1 + arch/arm/mach-s3c/mach-crag6410-module.c | 2 +- arch/arm/mach-s3c/mach-crag6410.c | 2 +- arch/arm/mach-s3c/mach-gta02.c | 1 + arch/arm/mach-s3c/mach-h1940.c | 1 + arch/arm/mach-s3c/mach-hmt.c | 2 +- arch/arm/mach-s3c/mach-jive.c | 2 +- arch/arm/mach-s3c/mach-mini2440.c | 3 ++- arch/arm/mach-s3c/mach-mini6410.c | 2 +- arch/arm/mach-s3c/mach-n30.c | 2 ++ arch/arm/mach-s3c/mach-ncp.c | 2 +- arch/arm/mach-s3c/mach-nexcoder.c | 1 + arch/arm/mach-s3c/mach-osiris.c | 1 + arch/arm/mach-s3c/mach-otom.c | 1 + arch/arm/mach-s3c/mach-qt2410.c | 1 + arch/arm/mach-s3c/mach-real6410.c | 2 +- arch/arm/mach-s3c/mach-rx1950.c | 1 + arch/arm/mach-s3c/mach-rx3715.c | 1 + arch/arm/mach-s3c/mach-smartq5.c | 2 +- arch/arm/mach-s3c/mach-smartq7.c | 2 +- arch/arm/mach-s3c/mach-smdk2410.c | 1 + arch/arm/mach-s3c/mach-smdk2413.c | 3 +++ arch/arm/mach-s3c/mach-smdk2416.c | 1 + arch/arm/mach-s3c/mach-smdk2440.c | 1 + arch/arm/mach-s3c/mach-smdk2443.c | 2 +- arch/arm/mach-s3c/mach-smdk6400.c | 2 +- arch/arm/mach-s3c/mach-smdk6410.c | 2 +- arch/arm/mach-s3c/mach-tct_hammer.c | 1 + arch/arm/mach-s3c/mach-vr1000.c | 1 + arch/arm/mach-s3c/mach-vstms.c | 1 + arch/arm/mach-s3c/pl080.c | 2 +- arch/arm/mach-s3c/pm-core-s3c24xx.h | 2 +- arch/arm/mach-s3c/pm-s3c2412.c | 2 +- arch/arm/mach-s3c/pm-s3c64xx.c | 2 +- arch/arm/mach-s3c/pm.c | 2 +- arch/arm/mach-s3c/s3c2443.c | 2 +- arch/arm/mach-s3c/s3c24xx.h | 2 +- arch/arm/mach-s3c/s3c64xx.c | 2 +- arch/arm/mach-s3c/simtec-usb.c | 2 +- 54 files changed, 69 insertions(+), 36 deletions(-) rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c24xx.h (95%) rename arch/arm/mach-s3c/{include/mach => }/irqs-s3c64xx.h (100%) rename arch/arm/mach-s3c/{include/mach => }/irqs.h (100%) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2242d2ae8854..c06e008c90ab 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -444,8 +444,10 @@ config ARCH_S3C24XX select CLKSRC_SAMSUNG_PWM select GPIO_SAMSUNG select GPIOLIB + select IRQ_DOMAIN select S3C2410_WATCHDOG select SAMSUNG_ATAGS + select SPARSE_IRQ select USE_OF select WATCHDOG help diff --git a/arch/arm/mach-s3c/bast-ide.c b/arch/arm/mach-s3c/bast-ide.c index da64db1811d8..67f0adc1fec0 100644 --- a/arch/arm/mach-s3c/bast-ide.c +++ b/arch/arm/mach-s3c/bast-ide.c @@ -20,7 +20,7 @@ #include #include "map.h" -#include +#include "irqs.h" #include "bast.h" diff --git a/arch/arm/mach-s3c/bast-irq.c b/arch/arm/mach-s3c/bast-irq.c index d299f124e6dc..cfc2ddc65513 100644 --- a/arch/arm/mach-s3c/bast-irq.c +++ b/arch/arm/mach-s3c/bast-irq.c @@ -16,7 +16,7 @@ #include #include "regs-irq.h" -#include +#include "irqs.h" #include "bast.h" diff --git a/arch/arm/mach-s3c/dev-audio-s3c64xx.c b/arch/arm/mach-s3c/dev-audio-s3c64xx.c index fc2f077afd24..909e82c148ba 100644 --- a/arch/arm/mach-s3c/dev-audio-s3c64xx.c +++ b/arch/arm/mach-s3c/dev-audio-s3c64xx.c @@ -10,7 +10,7 @@ #include #include -#include +#include "irqs.h" #include "map.h" #include "devs.h" diff --git a/arch/arm/mach-s3c/dev-uart-s3c64xx.c b/arch/arm/mach-s3c/dev-uart-s3c64xx.c index 8288e8d6c092..f9c947b8971b 100644 --- a/arch/arm/mach-s3c/dev-uart-s3c64xx.c +++ b/arch/arm/mach-s3c/dev-uart-s3c64xx.c @@ -16,7 +16,7 @@ #include #include #include "map.h" -#include +#include "irqs.h" #include "devs.h" diff --git a/arch/arm/mach-s3c/devs.c b/arch/arm/mach-s3c/devs.c index 1e266fc24f9b..9ac07c023adf 100644 --- a/arch/arm/mach-s3c/devs.c +++ b/arch/arm/mach-s3c/devs.c @@ -38,7 +38,7 @@ #include #include -#include +#include "irqs.h" #include "map.h" #include "gpio-samsung.h" #include "gpio-cfg.h" diff --git a/arch/arm/mach-s3c/gpio-samsung.c b/arch/arm/mach-s3c/gpio-samsung.c index fda2c01f5a08..b7fc7c41309c 100644 --- a/arch/arm/mach-s3c/gpio-samsung.c +++ b/arch/arm/mach-s3c/gpio-samsung.c @@ -26,7 +26,7 @@ #include -#include +#include "irqs.h" #include "map.h" #include "regs-gpio.h" #include "gpio-samsung.h" diff --git a/arch/arm/mach-s3c/irq-s3c24xx.c b/arch/arm/mach-s3c/irq-s3c24xx.c index 3776d5206f9b..088cc04b7431 100644 --- a/arch/arm/mach-s3c/irq-s3c24xx.c +++ b/arch/arm/mach-s3c/irq-s3c24xx.c @@ -26,7 +26,7 @@ #include #include -#include +#include "irqs.h" #include "regs-irq.h" #include "regs-gpio.h" diff --git a/arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h b/arch/arm/mach-s3c/irqs-s3c24xx.h similarity index 95% rename from arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h rename to arch/arm/mach-s3c/irqs-s3c24xx.h index aaf3bae08b52..fecbf7e440c6 100644 --- a/arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h +++ b/arch/arm/mach-s3c/irqs-s3c24xx.h @@ -108,6 +108,8 @@ #define IRQ_TC S3C2410_IRQSUB(9) #define IRQ_ADC S3C2410_IRQSUB(10) +#define NR_IRQS_S3C2410 (S3C2410_IRQSUB(10) + 1) + /* extra irqs for s3c2412 */ #define IRQ_S3C2412_CFSDI S3C2410_IRQ(21) @@ -115,6 +117,7 @@ #define IRQ_S3C2412_SDI S3C2410_IRQSUB(13) #define IRQ_S3C2412_CF S3C2410_IRQSUB(14) +#define NR_IRQS_S3C2412 (S3C2410_IRQSUB(14) + 1) #define IRQ_S3C2416_EINT8t15 S3C2410_IRQ(5) #define IRQ_S3C2416_DMA S3C2410_IRQ(17) @@ -146,13 +149,20 @@ #define IRQ_S3C2416_I2S0 S3C2416_IRQ(6) #define IRQ_S3C2416_I2S1 S3C2416_IRQ(7) -/* extra irqs for s3c2440 */ +#define NR_IRQS_S3C2416 (S3C2416_IRQ(7) + 1) + +/* extra irqs for s3c2440/s3c2442 */ #define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */ #define IRQ_S3C2440_CAM_P S3C2410_IRQSUB(12) /* S3C2443 too */ + +#define NR_IRQS_S3C2442 (S3C2410_IRQSUB(12) + 1) + #define IRQ_S3C2440_WDT S3C2410_IRQSUB(13) #define IRQ_S3C2440_AC97 S3C2410_IRQSUB(14) +#define NR_IRQS_S3C2440 (S3C2410_IRQSUB(14) + 1) + /* irqs for s3c2443 */ #define IRQ_S3C2443_DMA S3C2410_IRQ(17) /* IRQ_DMA1 */ @@ -186,11 +196,7 @@ #define IRQ_S3C2443_WDT S3C2410_IRQSUB(27) #define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28) -#if defined(CONFIG_CPU_S3C2416) -#define NR_IRQS (IRQ_S3C2416_I2S1 + 1) -#else -#define NR_IRQS (IRQ_S3C2443_AC97 + 1) -#endif +#define NR_IRQS_S3C2443 (S3C2410_IRQSUB(28) + 1) /* compatibility define. */ #define IRQ_UART3 IRQ_S3C2443_UART3 diff --git a/arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h b/arch/arm/mach-s3c/irqs-s3c64xx.h similarity index 100% rename from arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h rename to arch/arm/mach-s3c/irqs-s3c64xx.h diff --git a/arch/arm/mach-s3c/include/mach/irqs.h b/arch/arm/mach-s3c/irqs.h similarity index 100% rename from arch/arm/mach-s3c/include/mach/irqs.h rename to arch/arm/mach-s3c/irqs.h diff --git a/arch/arm/mach-s3c/mach-amlm5900.c b/arch/arm/mach-s3c/mach-amlm5900.c index 94c4512ace17..f85e5885e9b4 100644 --- a/arch/arm/mach-s3c/mach-amlm5900.c +++ b/arch/arm/mach-s3c/mach-amlm5900.c @@ -239,7 +239,9 @@ static void __init amlm5900_init(void) MACHINE_START(AML_M5900, "AML_M5900") .atag_offset = 0x100, + .nr_irqs = NR_IRQS_S3C2410, .map_io = amlm5900_map_io, + .nr_irqs = NR_IRQS_S3C2410, .init_irq = s3c2410_init_irq, .init_machine = amlm5900_init, .init_time = amlm5900_init_time, diff --git a/arch/arm/mach-s3c/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c index 60df40052209..4536f3e66e27 100644 --- a/arch/arm/mach-s3c/mach-anubis.c +++ b/arch/arm/mach-s3c/mach-anubis.c @@ -414,6 +414,7 @@ static void __init anubis_init(void) MACHINE_START(ANUBIS, "Simtec-Anubis") /* Maintainer: Ben Dooks */ .atag_offset = 0x100, + .nr_irqs = NR_IRQS_S3C2440, .map_io = anubis_map_io, .init_machine = anubis_init, .init_irq = s3c2440_init_irq, diff --git a/arch/arm/mach-s3c/mach-anw6410.c b/arch/arm/mach-s3c/mach-anw6410.c index 825714e9ac66..b67eae43e04f 100644 --- a/arch/arm/mach-s3c/mach-anw6410.c +++ b/arch/arm/mach-s3c/mach-anw6410.c @@ -40,7 +40,7 @@ #include "devs.h" #include "cpu.h" -#include +#include "irqs.h" #include "regs-gpio.h" #include "gpio-samsung.h" diff --git a/arch/arm/mach-s3c/mach-at2440evb.c b/arch/arm/mach-s3c/mach-at2440evb.c index c6a5a51d84aa..743403d873e0 100644 --- a/arch/arm/mach-s3c/mach-at2440evb.c +++ b/arch/arm/mach-s3c/mach-at2440evb.c @@ -225,6 +225,7 @@ static void __init at2440evb_init(void) MACHINE_START(AT2440EVB, "AT2440EVB") .atag_offset = 0x100, + .nr_irqs = NR_IRQS_S3C2440, .map_io = at2440evb_map_io, .init_machine = at2440evb_init, .init_irq = s3c2440_init_irq, diff --git a/arch/arm/mach-s3c/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c index 5ac24e406157..a33ceab81e09 100644 --- a/arch/arm/mach-s3c/mach-bast.c +++ b/arch/arm/mach-s3c/mach-bast.c @@ -575,6 +575,7 @@ static void __init bast_init(void) MACHINE_START(BAST, "Simtec-BAST") /* Maintainer: Ben Dooks */ .atag_offset = 0x100, + .nr_irqs = NR_IRQS_S3C2410, .map_io = bast_map_io, .init_irq = s3c2410_init_irq, .init_machine = bast_init, diff --git a/arch/arm/mach-s3c/mach-crag6410-module.c b/arch/arm/mach-s3c/mach-crag6410-module.c index 5d1d4b67a4b7..4edde13b89b5 100644 --- a/arch/arm/mach-s3c/mach-crag6410-module.c +++ b/arch/arm/mach-s3c/mach-crag6410-module.c @@ -28,7 +28,7 @@ #include #include "cpu.h" -#include +#include "irqs.h" #include "crag6410.h" diff --git a/arch/arm/mach-s3c/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c index e3e0fe897bcc..9a45474d1bf7 100644 --- a/arch/arm/mach-s3c/mach-crag6410.c +++ b/arch/arm/mach-s3c/mach-crag6410.c @@ -47,7 +47,7 @@ #include "map.h" #include "regs-gpio.h" #include "gpio-samsung.h" -#include +#include "irqs.h" #include "fb.h" #include "sdhci.h" diff --git a/arch/arm/mach-s3c/mach-gta02.c b/arch/arm/mach-s3c/mach-gta02.c index 418939ce0fc3..abfdce765525 100644 --- a/arch/arm/mach-s3c/mach-gta02.c +++ b/arch/arm/mach-s3c/mach-gta02.c @@ -572,6 +572,7 @@ static void __init gta02_init_time(void) MACHINE_START(NEO1973_GTA02, "GTA02") /* Maintainer: Nelson Castillo */ .atag_offset = 0x100, + .nr_irqs = NR_IRQS_S3C2442, .map_io = gta02_map_io, .init_irq = s3c2442_init_irq, .init_machine = gta02_machine_init, diff --git a/arch/arm/mach-s3c/mach-h1940.c b/arch/arm/mach-s3c/mach-h1940.c index 8a43ed1c4c4d..032b18837855 100644 --- a/arch/arm/mach-s3c/mach-h1940.c +++ b/arch/arm/mach-s3c/mach-h1940.c @@ -793,6 +793,7 @@ static void __init h1940_init(void) MACHINE_START(H1940, "IPAQ-H1940") /* Maintainer: Ben Dooks */ .atag_offset = 0x100, + .nr_irqs = NR_IRQS_S3C2410, .map_io = h1940_map_io, .reserve = h1940_reserve, .init_irq = s3c2410_init_irq, diff --git a/arch/arm/mach-s3c/mach-hmt.c b/arch/arm/mach-s3c/mach-hmt.c index b287e9987311..49ba16c447aa 100644 --- a/arch/arm/mach-s3c/mach-hmt.c +++ b/arch/arm/mach-s3c/mach-hmt.c @@ -26,7 +26,7 @@ #include