From patchwork Tue Oct 19 21:58:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12571253 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 3CE2EC433F5 for ; Tue, 19 Oct 2021 22:11:09 +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 F2E436128B for ; Tue, 19 Oct 2021 22:11:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F2E436128B 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=V5I59gxnmUhuHihW2C+dj4POONCD8Ez6DdxbhhtDWWc=; b=N3M48k0mfhnwVj JxtpZSGf7TjEpuQ1Z//tpsySa6WiyccZoGrXylcXSSygN6SFXMu7s71cyuV/bhlejkYM4Pu58AVbu fnVeGM0oi6oe439++Igc0mKEyGk/km8Yrwu7KiTT2c4NaxwFI3u78HAce7iQuF7M6x3x2382fKO2J CvOPlilpdrVoc10tKPOsSURW+OaIqYLUwWmnSM5bMce72xewLiRi3vtOg82AC0HDsrgyDGbgyP1BQ U1ggKcIc2weCaeAUT0rISATq7YMKamYP/73yQGd6LltV0ruLB2qvtb3UDNPj7/VJAdAcZzZpUBKS2 4Bn8B6uZKivQW60Yc2rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcxII-002n1F-PV; Tue, 19 Oct 2021 22:09:16 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcx8b-002is6-LU for linux-arm-kernel@lists.infradead.org; Tue, 19 Oct 2021 21:59:15 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d5so1180713pfu.1 for ; Tue, 19 Oct 2021 14:59:12 -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=aWPYyECBOs5OYjE8k6irOqRBKiYPlvj6VE98fHuBoEM=; b=gZJWRC+2dFqFJj4c/rZEMg7264OkMv1n7MpdwjL+0E5AyiCh7SwkFyhVWQrKQxvFln BoJWZLAvC0rh06ocnMSl8dSZzgjd/fWRf9dWTk4b+oQlmmojeV9XJx7mZ0qUaQs8skcS DGv9/lu7KmhHmXvVjGo4u76T0nPOwcvWxCWJJ/50ZZvCZQCG+FK1EDpdJ5drIGB9jf5P sMFZJOooOtzmlEI9zWLMbZKYXVKlxSVf8XgwjWB0dUKUrCxHvskWF37pd/oKcPWhPZbJ V0pxx9lLTvUFgKtkKjhkJQnZIEPK/dFfbdiEh9IJIKCl6BIkBXz2aZAz0J0VWwnU4Iv2 uPIw== 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=aWPYyECBOs5OYjE8k6irOqRBKiYPlvj6VE98fHuBoEM=; b=1eZzN2Et0fDUN9X9eIvBf1cwZcLOy6tH/RmEORp2475ZZVE5TPwjkS1+3CYB1/SU+J 84SgrRvqk6uP9yIn3OE6lX+XPyptzUpbQpFFwEKO7WzJzA+sY3RB1ASwi/P9sYtZUg0c uhTvSoyrL37d9Wg0Kwpa943+O7RAodM3yhnFa8RPfXfgccFGt51bVjXq4AtohFinGvkx IVLR66tLyy/3AEkovp0gwmpU0FrQSK8kJdbmAg/m2RXDGMfRGDJ+q1t/ClBoQe1GsLnV YV4zPOVnZDCJ4q8Kp1oLoOxaAg0vc4CdXfNLGr92LAYrJsKZ7phn6jDZKQvdMwy7mTxL 9bfA== X-Gm-Message-State: AOAM533OeZul8eL5MxpzMdJs2H0Fzm8UU33eXmxFH5IuygGkh3qF4c3J QZRs1fKeV6G7CEVAEI6OWTIZPxOkilk= X-Google-Smtp-Source: ABdhPJy8A7uayRH/1ly9xr+VoiYI9yqmLB8Gb5p6PceSN1VUrSXpmwLJnuuudGx3zOEDJiGe6n11qQ== X-Received: by 2002:a62:7752:0:b0:44c:eb65:8561 with SMTP id s79-20020a627752000000b0044ceb658561mr2386280pfc.43.1634680752487; Tue, 19 Oct 2021 14:59:12 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id bf7sm139325pjb.14.2021.10.19.14.59.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 14:59:11 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v5 07/14] irqchip/irq-bcm7038-l1: Switch to IRQCHIP_PLATFORM_DRIVER Date: Tue, 19 Oct 2021 14:58:48 -0700 Message-Id: <20211019215855.1920099-8-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211019215855.1920099-1-f.fainelli@gmail.com> References: <20211019215855.1920099-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-20211019_145913_739864_95AA45C0 X-CRM114-Status: GOOD ( 17.33 ) 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-bcm7038-l1.c | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 4d5924e9f766..3022f6137096 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -115,7 +115,9 @@ config BCM6345_L1_IRQ select GENERIC_IRQ_EFFECTIVE_AFF_MASK config BCM7038_L1_IRQ - bool + tristate "Broadcom STB 7038-style L1/L2 interrupt controller driver" + depends on ARCH_BRCMSTB || BMIPS_GENERIC + default ARCH_BRCMSTB || BMIPS_GENERIC select GENERIC_IRQ_CHIP select IRQ_DOMAIN select GENERIC_IRQ_EFFECTIVE_AFF_MASK diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c index 357570dd8780..f1e6e14145d2 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -397,7 +397,8 @@ static const struct irq_domain_ops bcm7038_l1_domain_ops = { }; static int __init bcm7038_l1_of_init(struct device_node *dn, - struct device_node *parent) + struct device_node *parent, + struct platform_device *pdev) { struct bcm7038_l1_chip *intc; int idx, ret; @@ -455,4 +456,8 @@ static int __init bcm7038_l1_of_init(struct device_node *dn, return ret; } -IRQCHIP_DECLARE(bcm7038_l1, "brcm,bcm7038-l1-intc", bcm7038_l1_of_init); +IRQCHIP_PLATFORM_DRIVER_BEGIN(bcm7038_l1) +IRQCHIP_MATCH("brcm,bcm7038-l1-intc", bcm7038_l1_of_init) +IRQCHIP_PLATFORM_DRIVER_END(bcm7038_l1) +MODULE_DESCRIPTION("Broadcom STB 7038-style L1/L2 interrupt controller"); +MODULE_LICENSE("GPL v2");