From nobody Sun May 10 09:55:29 2026 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 4AC27C433F5 for ; Mon, 9 May 2022 03:55:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232657AbiEID5a (ORCPT ); Sun, 8 May 2022 23:57:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234083AbiEIDxt (ORCPT ); Sun, 8 May 2022 23:53:49 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D36CF61F3 for ; Sun, 8 May 2022 20:49:57 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3AAE95C00E3; Sun, 8 May 2022 23:49:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 08 May 2022 23:49:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1652068184; x=1652154584; bh=M8c+rWOG2tl/Ozu3xwi5hO5jK mpxMCpEbGJNM99i7+w=; b=ooF5GKGp2cg5L2N2Tpr8VM4sB6j1ewQWnjTz9Y3NE 47VJHRzWElom5nREXP2RK+U+K4PtD3iK2mEsTxbWLmKN6KbOvB7N5cpMUbV5k841 xBn59G7hhOOJTHbFwpWCKMuzew6M0dzL1/alBoRu3UP/ipaFA1dU7i4NqKkGJDqu ogPUJHHmSYLZR7Q0RWxHPtSU4xeUjY3gdzFOQCLL6rpmIVsfxZRF5/LU3kKGtQvK PXfAxnTYmuBW1h8PYaq1/f5w0RHaEC1Rd8bxEWWsjuVsMX2W07jP9NFiWUuGajOa xTz6w/eiunXTCDnEOYQpqWA3TKRNYzXEx1TkBQ/EsJxdg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1652068184; x=1652154584; bh=M 8c+rWOG2tl/Ozu3xwi5hO5jKmpxMCpEbGJNM99i7+w=; b=Dl+OLImYeWZgRQKl7 zBfuXrSCrQ2LnPEu6skSVls95GpC5duSbXe7GZoYQ3AaF6F0ivjOUlICg4ogTO4R l3Ph2nA/9vc1TSzJz32uoXsWisdvAE4jbD/lRVzbXSd6A0pz3ARILSzTDPLlUYX9 F7T02519LRoUxjIValjyXjWS1jS5ky0dwzrEwmF/8jGNvFV4bLMEs99T+gveGKcN DQrouCJGNjANWpVS8dw3RQdpWsxVLsj2ol5gvO0uKhPDiQd7YEo/kpnCXP2MWspw eLJicr/Kv9k0BX6X0s1AWOOWl1Wh90FkS/KTpvYCz22p8+qFvD4LdoCZZn8pDPeE az4jg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeekgdejiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgvlhcu jfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtffrrg htthgvrhhnpeekveelhfejueelleetvdejvdeffeetgeelheeujeffhefgffefkeehhffh keekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 8 May 2022 23:49:42 -0400 (EDT) From: Samuel Holland To: Thomas Gleixner , Marc Zyngier Cc: Samuel Holland , Catalin Marinas , Chen-Yu Tsai , Jernej Skrabec , Russell King , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH] irqchip: Add Kconfig symbols for sunxi drivers Date: Sun, 8 May 2022 22:49:41 -0500 Message-Id: <20220509034941.30704-1-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Not all of these drivers are needed on every ARCH_SUNXI platform. In particular, the ARCH_SUNXI symbol will be reused for the Allwinner D1, a RISC-V SoC which contains none of these irqchips. Introduce Kconfig symbols so we can select only the drivers actually used by a particular set of platforms. This also lets us move the irqchip driver dependencies to a more appropriate location. Signed-off-by: Samuel Holland --- arch/arm/mach-sunxi/Kconfig | 12 +++++++++--- arch/arm64/Kconfig.platforms | 5 ++--- drivers/irqchip/Kconfig | 12 ++++++++++++ drivers/irqchip/Makefile | 6 +++--- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index e5c2fce281cd..abdb99fe1e97 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -4,10 +4,7 @@ menuconfig ARCH_SUNXI depends on ARCH_MULTI_V5 || ARCH_MULTI_V7 select ARCH_HAS_RESET_CONTROLLER select CLKSRC_MMIO - select GENERIC_IRQ_CHIP select GPIOLIB - select IRQ_DOMAIN_HIERARCHY - select IRQ_FASTEOI_HIERARCHY_HANDLERS select PINCTRL select PM_OPP select SUN4I_TIMER @@ -22,10 +19,12 @@ if ARCH_MULTI_V7 config MACH_SUN4I bool "Allwinner A10 (sun4i) SoCs support" default ARCH_SUNXI + select SUN4I_INTC =20 config MACH_SUN5I bool "Allwinner A10s / A13 (sun5i) SoCs support" default ARCH_SUNXI + select SUN4I_INTC select SUN5I_HSTIMER =20 config MACH_SUN6I @@ -34,6 +33,8 @@ config MACH_SUN6I select ARM_GIC select MFD_SUN6I_PRCM select SUN5I_HSTIMER + select SUN6I_R_INTC + select SUNXI_NMI_INTC =20 config MACH_SUN7I bool "Allwinner A20 (sun7i) SoCs support" @@ -43,17 +44,21 @@ config MACH_SUN7I select ARCH_SUPPORTS_BIG_ENDIAN select HAVE_ARM_ARCH_TIMER select SUN5I_HSTIMER + select SUNXI_NMI_INTC =20 config MACH_SUN8I bool "Allwinner sun8i Family SoCs support" default ARCH_SUNXI select ARM_GIC select MFD_SUN6I_PRCM + select SUN6I_R_INTC + select SUNXI_NMI_INTC =20 config MACH_SUN9I bool "Allwinner (sun9i) SoCs support" default ARCH_SUNXI select ARM_GIC + select SUNXI_NMI_INTC =20 config ARCH_SUNXI_MC_SMP bool @@ -69,6 +74,7 @@ if ARCH_MULTI_V5 config MACH_SUNIV bool "Allwinner ARMv5 F-series (suniv) SoCs support" default ARCH_SUNXI + select SUN4I_INTC help Support for Allwinner suniv ARMv5 SoCs. (F1C100A, F1C100s, F1C200s, F1C500, F1C600) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 30b123cde02c..b9a9d5de0e00 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -11,12 +11,11 @@ config ARCH_ACTIONS config ARCH_SUNXI bool "Allwinner sunxi 64-bit SoC Family" select ARCH_HAS_RESET_CONTROLLER - select GENERIC_IRQ_CHIP - select IRQ_DOMAIN_HIERARCHY - select IRQ_FASTEOI_HIERARCHY_HANDLERS select PINCTRL select RESET_CONTROLLER select SUN4I_TIMER + select SUN6I_R_INTC + select SUNXI_NMI_INTC help This enables support for Allwinner sunxi based SoCs like the A64. =20 diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 15edb9a6fcae..135c156673a7 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -257,6 +257,18 @@ config ST_IRQCHIP help Enables SysCfg Controlled IRQs on STi based platforms. =20 +config SUN4I_INTC + bool + +config SUN6I_R_INTC + bool + select IRQ_DOMAIN_HIERARCHY + select IRQ_FASTEOI_HIERARCHY_HANDLERS + +config SUNXI_NMI_INTC + bool + select GENERIC_IRQ_CHIP + config TB10X_IRQC bool select IRQ_DOMAIN diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile index 160a1d8ceaa9..9b1ffb0f98cc 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile @@ -23,9 +23,9 @@ obj-$(CONFIG_OMPIC) +=3D irq-ompic.o obj-$(CONFIG_OR1K_PIC) +=3D irq-or1k-pic.o obj-$(CONFIG_ORION_IRQCHIP) +=3D irq-orion.o obj-$(CONFIG_OMAP_IRQCHIP) +=3D irq-omap-intc.o -obj-$(CONFIG_ARCH_SUNXI) +=3D irq-sun4i.o -obj-$(CONFIG_ARCH_SUNXI) +=3D irq-sun6i-r.o -obj-$(CONFIG_ARCH_SUNXI) +=3D irq-sunxi-nmi.o +obj-$(CONFIG_SUN4I_INTC) +=3D irq-sun4i.o +obj-$(CONFIG_SUN6I_R_INTC) +=3D irq-sun6i-r.o +obj-$(CONFIG_SUNXI_NMI_INTC) +=3D irq-sunxi-nmi.o obj-$(CONFIG_ARCH_SPEAR3XX) +=3D spear-shirq.o obj-$(CONFIG_ARM_GIC) +=3D irq-gic.o irq-gic-common.o obj-$(CONFIG_ARM_GIC_PM) +=3D irq-gic-pm.o --=20 2.35.1