From patchwork Tue Sep 28 02:27:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12521585 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A82DC433EF for ; Tue, 28 Sep 2021 02:33:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04B4760F9B for ; Tue, 28 Sep 2021 02:33:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 04B4760F9B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3qnRbArCl4gqMMKVot0gFktSVXCRf53Q+4rvw7V2aZo=; b=VN+/dfiNZD95U2 aaIbQ+vTXWezU5vkDluv82yg8xcq5g3X744RNQUEJEu6TI47//9y7oZEIfp4WVyswHz+QRuLaKXNz 5g1ahKOBu/LMREjVoDPJuDXiSztcd7DQG4D204FOpFGv5/0V5Q3OdANjSW+weCT21s3m1mLpttp5U 3rnRVX3kMUUCHxjVpFHpkGYxIFxu+PavtWAqHujery9nSIofKjuZWOurZLsBkYhbIyO23TxCnDwRV MKisFteKu6/rTzssuML7pu9ovpNDcMeqd3oXylJJvJItZylRedX6j/8onCaJTn4a3n99rIfEdBXfZ 2R0ACeTRw4zoSlzXUnYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV2to-005HP9-IB; Tue, 28 Sep 2021 02:31:17 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV2rj-005GRg-Hj for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 02:29:09 +0000 Received: by mail-pf1-x434.google.com with SMTP id 203so17585977pfy.13 for ; Mon, 27 Sep 2021 19:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9fJWAIDZMBnqyaJKloz+swm+vHzzjwQ8q/tXjCn73F0=; b=avArYIgqveoiqNyD88bnUiDBLca1zT5jiBXVayToI+PO+qwNqTUXrQ6m9rJaQhc0sM eTw51QB31qIppvgLVeFAvLh+bf84SZTPDUx5ujF3OBNKCjzUHJ5nvrl5YYOF3VUowFpk yqVRPTjIN1GmDS0DjaAtqaGGzd9tbyzChbkxUKNCRfD40Bgo3okAVdsGU7wWkCPnhiOD 3q/CecxnXb+P47LIbnJlZzhRXqizCVWUBsSRXkXriqWt+UBLFbyR0IiAC9VzSCapo7rJ 5fZcNJQxSkC6p+L8rHdkIVJpCMZIrRVL70OFy6tvO2hvy7y6rQjnoXHDVTS+w3WQD7Dl MURw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9fJWAIDZMBnqyaJKloz+swm+vHzzjwQ8q/tXjCn73F0=; b=SqBH3cKedL6yoATFxqJwkI3MLcjyKgrn/mEjp5zrJe7QRiclgFbTvkP4V7PY1SG2Vr WROZ49wsZKFKYbyV0bGIOkfaKPFV0002XcwiF9KP5JHWBopMs1iYwIhaYBX0e8x2Iy28 rMm8xZkGYiPFRPtp5LuvEGMm4kEuGJBUQVx9LXP0G+at/oRIxBkcW7toEvcNrFM39iD+ AtL41z/NGjr8HmdouYtRZvbBY+9g1lxFpRPZomEdJEIeXxvS/Elnm84r9WU+KGQDs1eB OpMRN6CEwpQKvRzzqK6+U2Na6E8LLAx9p4/mCogGKQOoprmb+AS04DFAJcga/S3ILpAG OydA== X-Gm-Message-State: AOAM532ZYa97UEFWSzAxox1luwCATmMfLRMDmnp4zJQAxkbh+EVvsj6X S/6hd94mlRFMbFouAO+QGL4= X-Google-Smtp-Source: ABdhPJxrXOObRhpa/JQHSjoFBdJMwRgQiZH5DJq2XWAOm/lf0/ZIAcPd78EiklkJG/+okaWOReZnew== X-Received: by 2002:a62:5a41:0:b0:448:152d:78bf with SMTP id o62-20020a625a41000000b00448152d78bfmr2825501pfb.77.1632796146397; Mon, 27 Sep 2021 19:29:06 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id k14sm633261pji.45.2021.09.27.19.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 19:29:05 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Russell King , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Catalin Marinas , Will Deacon , Yoshinori Sato , Rich Felker , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , Ard Biesheuvel , Mike Rapoport , Linus Walleij , Andrew Morton , Geert Uytterhoeven , Arnd Bergmann , Guenter Roeck , Kefeng Wang , Mark Rutland , Andrey Konovalov , Anshuman Khandual , Valentin Schneider , Ingo Molnar , Peter Zijlstra , linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT), linux-sh@vger.kernel.org (open list:SUPERH), linux-mips@vger.kernel.org (open list:BROADCOM BMIPS MIPS ARCHITECTURE), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v2 07/12] irqchip/irq-brcmstb-l2: Switch to IRQCHIP_PLATFORM_DRIVER Date: Mon, 27 Sep 2021 19:27:10 -0700 Message-Id: <20210928022715.369160-8-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928022715.369160-1-f.fainelli@gmail.com> References: <20210928022715.369160-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210927_192907_625437_02C1F730 X-CRM114-Status: GOOD ( 18.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Allow the user selection and building of this interrupt controller driver as a module since it is used on ARM/ARM64 based systems as a second level interrupt controller hanging off the ARM GIC and is therefore loadable during boot. Signed-off-by: Florian Fainelli --- drivers/irqchip/Kconfig | 4 +++- drivers/irqchip/irq-brcmstb-l2.c | 16 +++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 3022f6137096..dfe54bf9b35f 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -128,7 +128,9 @@ config BCM7120_L2_IRQ select IRQ_DOMAIN config BRCMSTB_L2_IRQ - bool + tristate "Broadcom STB generic L2 interrupt controller driver" + depends on ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC + default ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC select GENERIC_IRQ_CHIP select IRQ_DOMAIN diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb-l2.c index 8e0911561f2d..e4efc08ac594 100644 --- a/drivers/irqchip/irq-brcmstb-l2.c +++ b/drivers/irqchip/irq-brcmstb-l2.c @@ -275,16 +275,18 @@ static int __init brcmstb_l2_edge_intc_of_init(struct device_node *np, { return brcmstb_l2_intc_of_init(np, parent, &l2_edge_intc_init); } -IRQCHIP_DECLARE(brcmstb_l2_intc, "brcm,l2-intc", brcmstb_l2_edge_intc_of_init); -IRQCHIP_DECLARE(brcmstb_hif_spi_l2_intc, "brcm,hif-spi-l2-intc", - brcmstb_l2_edge_intc_of_init); -IRQCHIP_DECLARE(brcmstb_upg_aux_aon_l2_intc, "brcm,upg-aux-aon-l2-intc", - brcmstb_l2_edge_intc_of_init); static int __init brcmstb_l2_lvl_intc_of_init(struct device_node *np, struct device_node *parent) { return brcmstb_l2_intc_of_init(np, parent, &l2_lvl_intc_init); } -IRQCHIP_DECLARE(bcm7271_l2_intc, "brcm,bcm7271-l2-intc", - brcmstb_l2_lvl_intc_of_init); + +IRQCHIP_PLATFORM_DRIVER_BEGIN(brcmstb_l2) +IRQCHIP_MATCH("brcm,l2-intc", brcmstb_l2_edge_intc_of_init) +IRQCHIP_MATCH("brcm,hif-spi-l2-intc", brcmstb_l2_edge_intc_of_init) +IRQCHIP_MATCH("brcm,upg-aux-aon-l2-intc", brcmstb_l2_edge_intc_of_init) +IRQCHIP_MATCH("brcm,bcm7271-l2-intc", brcmstb_l2_lvl_intc_of_init) +IRQCHIP_PLATFORM_DRIVER_END(brcmstb_l2) +MODULE_DESCRIPTION("Broadcom STB generic L2 interrupt controller"); +MODULE_LICENSE("GPL v2");