From patchwork Wed Apr 3 20:34:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13616667 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BED7CCD128A for ; Wed, 3 Apr 2024 20:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TXlWZq/JGTgKSFPAe8wJefAOtEJXzzTYVbHagB4PUtw=; b=eLPd84bt6Wvm1m qTPsFX1s9EYE4vhAF7QBOmvIOCvbBrO8wTwcdcQFU6LYSRjSbW8rPxl2smr7oygMqPEelDvsfSVDK gKx2L4quwTeLxjs+rVElRHMf34GAOBAIjUh38osR+5W46xNfcN10om6gLZ3e+rRnXhFWCKgq/NZn6 8j09u2WpM1lTYdt5HLfiLUszHaMzta3xBMAl3TvMfo8gzTUCIxwqD0Vecf1bJq7UQMhFH2JLDKqvs L69RdVWFSbIzuYkGgdXidjKwttew+bMZ2BtlXtFmjDtDbM66MpVW1FU78vLhtLhaAqR5/GckdEulH n4asnG24V2FlghI34sTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7Lc-000000006rz-3puS; Wed, 03 Apr 2024 20:36:40 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7LY-000000006qJ-2DQ8 for linux-riscv@lists.infradead.org; Wed, 03 Apr 2024 20:36:38 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3436ffe05c9so138136f8f.1 for ; Wed, 03 Apr 2024 13:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712176594; x=1712781394; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZUH7OqsY6sf88nvHWT1W52xeXKt/+dN6doaNx9JrqxY=; b=hWBz2GcRu1vEchU+lonBWlVM3Aaek+knkqgR74CmiLO7jJiEQvzkg8rmZRHvIjBuOW NBa/mB2m9ZqoMJ4Id1P/qEG9ejUx7uwBp33PsKcJaD+zCRKZfl6x5F68JJJnw4n51Waz O4xmTi4U+JJMLEWnCevmbIrfJ1tJcvQFG6bDpZCPmBsjPtmi1WUKowhg7IvB3QZ5lPvQ tJ6jB4PtwF0rJvKzecFaWcO0dnFfk0aLA7Iw6SNp4lxYgFxSACkEmZ8HBdNQ7Hppe1eB DunVCEbo514gU7A7H6RHwszuBeW90z6Prjm946xG+4ehpQDSev7k5dK1ZCZvyPg+tbF+ AeOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712176594; x=1712781394; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZUH7OqsY6sf88nvHWT1W52xeXKt/+dN6doaNx9JrqxY=; b=aBk0R5cIQPK+PtYzKmNh5O8vyqAlLQb3xtIta1GjLzcqn3utvny468ui7kM4I+b0rN AdwCsHHiX7S05PaYvOTuW3q8HTOgV2eUqsMUOqTszo9XR5MX6d2As/euFG7IyGU/s7Ee U32W1i5tNx6BN0raQrm0Qckgw4Is9zBsX55umOPEt+nk4mTY75Oa8YiCPjAGCTi8BYKW T5Z1CiR+V4GwDtX76OSBAtUWJgnHoads9J7tNV27dAevC/3uc7+bu8GUVOGsmWl34H8r UvO8qrohWOUS9uFRvZGyo1EWYIoj3tqEoAnPK/D11IwTVu/yWGWsYgeMlYfUPJUImlBV WmKA== X-Forwarded-Encrypted: i=1; AJvYcCVbIPqcj52+WpWeC75YoTkJkILP1vETEokdUPkriolOQbOwtazzFkOuVmvJa4h31nQR1BBHmop21B0/BFUYErbQKkBXBsVZmIcoCezNEKmi X-Gm-Message-State: AOJu0YyZw77w11OyEaaCe6XheHTKvk2i2eSVSmzjOE14BDwt5U8QdrbE kAFBE/1oo6MbMmaHk/rLCZIMdiX76u6VI5eKg4SISAFFiZQyqbOZ X-Google-Smtp-Source: AGHT+IGNTM0sZ87+Wmh+Qg37VGEcAylBAuD8K4vBkdPoDwX5QwmGHCcZNo2VTkh442bBlxrZTK+PUQ== X-Received: by 2002:a5d:5451:0:b0:343:7d3c:ddcd with SMTP id w17-20020a5d5451000000b003437d3cddcdmr425201wrv.1.1712176594421; Wed, 03 Apr 2024 13:36:34 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:5eb:3d93:f2b6:25e8]) by smtp.gmail.com with ESMTPSA id p4-20020a05600c468400b00415f496b9b7sm244910wmo.39.2024.04.03.13.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 13:36:33 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-riscv@lists.infradead.org, Prabhakar , Lad Prabhakar Subject: [PATCH v2 1/5] dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/Five SoC Date: Wed, 3 Apr 2024 21:34:59 +0100 Message-Id: <20240403203503.634465-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_133636_594138_C5BE0E4C X-CRM114-Status: GOOD ( 10.62 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Document RZ/Five (R9A07G043F) IRQC bindings. The IRQC block on the RZ/Five SoC is almost identical to the one found on the RZ/G2L SoC, with the only difference being that it has additional mask control registers for NMI/IRQ/TINT. Hence new compatible string "renesas,r9a07g043f-irqc" is added for RZ/Five SoC. Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven --- v1->v2 - Dropped the checks for interrupts as its already handled - Added SoC specific compat string --- .../renesas,rzg2l-irqc.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml index daef4ee06f4e..2a871cbf6f87 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml @@ -21,13 +21,16 @@ description: | properties: compatible: - items: - - enum: - - renesas,r9a07g043u-irqc # RZ/G2UL - - renesas,r9a07g044-irqc # RZ/G2{L,LC} - - renesas,r9a07g054-irqc # RZ/V2L - - renesas,r9a08g045-irqc # RZ/G3S - - const: renesas,rzg2l-irqc + oneOf: + - items: + - enum: + - renesas,r9a07g043u-irqc # RZ/G2UL + - renesas,r9a07g044-irqc # RZ/G2{L,LC} + - renesas,r9a07g054-irqc # RZ/V2L + - renesas,r9a08g045-irqc # RZ/G3S + - const: renesas,rzg2l-irqc + - items: + - const: renesas,r9a07g043f-irqc # RZ/Five '#interrupt-cells': description: The first cell should contain a macro RZG2L_{NMI,IRQX} included in the From patchwork Wed Apr 3 20:35:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13616672 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02E8CCD128A for ; Wed, 3 Apr 2024 20:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ldX2WSTdVGs6phe6Um2oVimPScxP9dzDOGNa79GQ508=; b=xtpvvGrRZObK01 f01PczY/xa/hhupfXrqIyhQqOVoPYa4DTfMk5RH+LTvr9y2JUB1u3fH2sz1EB6/jFu6fow9vd+40U 1EXRK9DqqZAwZP8Lb8ek447A3MkmXXrzJaL4RI507MiOXdXfhSHOrdV+yZDrHoaNG/CVXce9zErb5 06mPXYet7mnqFGgR8ddmfrO6lqhOxLNo1pJRERaqKoQETQX/YqMFKd9QNDCtalf1FOQLDL6knfnW5 BYGRQzpsYmBTLSYOoEnl4Nm1AzyLz2uRAsbS7FrqRPYm+X2XRyXuQCkMSIdPwd0irewLs4FUgGGmh ADbWCoC+kPXJh/9Grp7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7Ld-000000006sQ-2WnQ; Wed, 03 Apr 2024 20:36:41 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7La-000000006qq-0E2f for linux-riscv@lists.infradead.org; Wed, 03 Apr 2024 20:36:39 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4155baa696eso1700495e9.2 for ; Wed, 03 Apr 2024 13:36:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712176596; x=1712781396; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rMv83C9HZj+2SogqW00zXdzxUFZuc3kgXWuJykzdMro=; b=X8YdUW0UZ/sUb5y0F197od4sNKYlHxeFcAt4tUdAVt6tCC/D/iiLUDhUqKhmijpQVd WvWN91qpFfGi2qT3pHVFVoHBSONBV850wiaZWD4SplpgA4ihjzFUU9XBsTAxZ63Wt7kF pNPfzhoCHJDFBxm3pnkdp7An0xPOJhvjP79478uNvSCUckfdApyyxHxnsPc7gdCYiX+v YT5fWmToPGhgh50h1huHiLlmXKofKsAP9vhtkVNEcSzWXdN7/CMJr6+3DJZOUaZgyfkw mOzbMZ+z6eHbtHVbp4KasgSzfANa7IkBZocrcMjf3Rf3eLR7uPt5I9+ck9o5G6tYq+5S ZHmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712176596; x=1712781396; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rMv83C9HZj+2SogqW00zXdzxUFZuc3kgXWuJykzdMro=; b=sm8RrVgfDC49DaWqU9LYJhph2mIj3zvD6JTGTtTf9ZjnPhOLv+0yPr+4Er4v6QmYLL 26K3c2hZ3c6QjP0IWE+ydzEHQe8eXSIaWNncl2sCrmEIAuliP2KPNOK4OV7Um9hMzaR5 /Yc/bIAannf9SpvsLsu51nBRLLNjUFj4mPgLsHXcuiX0OM4RCcE1/6y92gD558l/GJNL l1S9JGOe35zJerOpWctui9X5XptWakhl6rdyW1NWZyWZ0MiKVg6Rj+ZBDs3xzQScmGJL um18Mwl9ewwhZ4NjsSVuDiXCzu1y1mwFKhdEfw817HeQ26eptalnfD4fb+VNY2jMncu8 JrmQ== X-Forwarded-Encrypted: i=1; AJvYcCX5Dk2g/BuIY1cPGprix27SV936c5mgIR3awDpGqkVIvP1cTTk9Wf0EVYYdJ1O+HsZrQm4i286bBbEdOLopLEnfTTnYslWoUo9cD97sg+Hc X-Gm-Message-State: AOJu0Yx+xpPsSTjraU082Naun0KCwsXHtKLUBiYL29z1XLGpY4UqZnEv cd3mL/kqj5a8Wd6OjOkKX5E3jIl5yTEWNyqCF02hFpXjMEX9XYAi X-Google-Smtp-Source: AGHT+IEiuoPlj2zo+VYIZTCevGavSKbOjyHDcIEW9nRIyqTbej1LKgxI7SRDzlI8L9bXy0Dm2IMGXg== X-Received: by 2002:a05:600c:2285:b0:415:4853:f722 with SMTP id 5-20020a05600c228500b004154853f722mr522642wmf.10.1712176595776; Wed, 03 Apr 2024 13:36:35 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:5eb:3d93:f2b6:25e8]) by smtp.gmail.com with ESMTPSA id p4-20020a05600c468400b00415f496b9b7sm244910wmo.39.2024.04.03.13.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 13:36:34 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-riscv@lists.infradead.org, Prabhakar , Lad Prabhakar Subject: [PATCH v2 2/5] irqchip/renesas-rzg2l: Add support for RZ/Five SoC Date: Wed, 3 Apr 2024 21:35:00 +0100 Message-Id: <20240403203503.634465-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_133638_198893_0E7D2CF2 X-CRM114-Status: GOOD ( 21.40 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar The IX45 block has additional mask registers (NMSK/IMSK/TMSK) as compared to the RZ/G2L (family) SoC. Introduce masking/unmasking support for IRQ and TINT interrupts in IRQC controller driver. Two new registers, IMSK and TMSK, are defined to handle masking on RZ/Five SoC. The implementation utilizes a new data structure, `struct rzg2l_irqc_data`, to determine mask support for a specific controller instance. Signed-off-by: Lad Prabhakar --- v1->v2 - Added IRQCHIP_MATCH() for RZ/Five - Retaining a copy of OF data in priv - Rebased the changes --- drivers/irqchip/irq-renesas-rzg2l.c | 137 +++++++++++++++++++++++++++- 1 file changed, 132 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c index f6484bf15e0b..6fa8d65605dc 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -37,6 +37,8 @@ #define TSSEL_SHIFT(n) (8 * (n)) #define TSSEL_MASK GENMASK(7, 0) #define IRQ_MASK 0x3 +#define IMSK 0x10010 +#define TMSK 0x10020 #define TSSR_OFFSET(n) ((n) % 4) #define TSSR_INDEX(n) ((n) / 4) @@ -66,15 +68,25 @@ struct rzg2l_irqc_reg_cache { u32 titsr[2]; }; +/** + * struct rzg2l_irqc_of_data - OF data structure + * @mask_supported: Indicates if mask registers are available + */ +struct rzg2l_irqc_of_data { + bool mask_supported; +}; + /** * struct rzg2l_irqc_priv - IRQ controller private data structure * @base: Controller's base address + * @data: OF data pointer * @fwspec: IRQ firmware specific data * @lock: Lock to serialize access to hardware registers * @cache: Registers cache for suspend/resume */ static struct rzg2l_irqc_priv { void __iomem *base; + const struct rzg2l_irqc_of_data *data; struct irq_fwspec fwspec[IRQC_NUM_IRQ]; raw_spinlock_t lock; struct rzg2l_irqc_reg_cache cache; @@ -138,18 +150,102 @@ static void rzg2l_irqc_eoi(struct irq_data *d) irq_chip_eoi_parent(d); } +static void rzg2l_irqc_mask_irq_interrupt(struct rzg2l_irqc_priv *priv, + unsigned int hwirq) +{ + u32 imsk = readl_relaxed(priv->base + IMSK); + u32 bit = BIT(hwirq - IRQC_IRQ_START); + + writel_relaxed(imsk | bit, priv->base + IMSK); +} + +static void rzg2l_irqc_unmask_irq_interrupt(struct rzg2l_irqc_priv *priv, + unsigned int hwirq) +{ + u32 imsk = readl_relaxed(priv->base + IMSK); + u32 bit = BIT(hwirq - IRQC_IRQ_START); + + writel_relaxed(imsk & ~bit, priv->base + IMSK); +} + +static void rzg2l_irqc_mask_tint_interrupt(struct rzg2l_irqc_priv *priv, + unsigned int hwirq) +{ + u32 tmsk = readl_relaxed(priv->base + TMSK); + u32 bit = BIT(hwirq - IRQC_TINT_START); + + writel_relaxed(tmsk | bit, priv->base + TMSK); +} + +static void rzg2l_irqc_unmask_tint_interrupt(struct rzg2l_irqc_priv *priv, + unsigned int hwirq) +{ + u32 tmsk = readl_relaxed(priv->base + TMSK); + u32 bit = BIT(hwirq - IRQC_TINT_START); + + writel_relaxed(tmsk & ~bit, priv->base + TMSK); +} + +/* Must be called while priv->lock is held */ +static void rzg2l_irqc_mask_once(struct rzg2l_irqc_priv *priv, unsigned int hwirq) +{ + if (!priv->data->mask_supported) + return; + + if (hwirq >= IRQC_IRQ_START && hwirq <= IRQC_IRQ_COUNT) + rzg2l_irqc_mask_irq_interrupt(priv, hwirq); + else if (hwirq >= IRQC_TINT_START && hwirq < IRQC_NUM_IRQ) + rzg2l_irqc_mask_tint_interrupt(priv, hwirq); +} + +static void rzg2l_irqc_mask(struct irq_data *d) +{ + struct rzg2l_irqc_priv *priv = irq_data_to_priv(d); + + raw_spin_lock(&priv->lock); + rzg2l_irqc_mask_once(priv, irqd_to_hwirq(d)); + raw_spin_unlock(&priv->lock); + irq_chip_mask_parent(d); +} + +/* Must be called while priv->lock is held */ +static void rzg2l_irqc_unmask_once(struct rzg2l_irqc_priv *priv, unsigned int hwirq) +{ + if (!priv->data->mask_supported) + return; + + if (hwirq >= IRQC_IRQ_START && hwirq <= IRQC_IRQ_COUNT) + rzg2l_irqc_unmask_irq_interrupt(priv, hwirq); + else if (hwirq >= IRQC_TINT_START && hwirq < IRQC_NUM_IRQ) + rzg2l_irqc_unmask_tint_interrupt(priv, hwirq); +} + +static void rzg2l_irqc_unmask(struct irq_data *d) +{ + struct rzg2l_irqc_priv *priv = irq_data_to_priv(d); + + raw_spin_lock(&priv->lock); + rzg2l_irqc_unmask_once(priv, irqd_to_hwirq(d)); + raw_spin_unlock(&priv->lock); + irq_chip_unmask_parent(d); +} + static void rzg2l_tint_irq_endisable(struct irq_data *d, bool enable) { + struct rzg2l_irqc_priv *priv = irq_data_to_priv(d); unsigned int hw_irq = irqd_to_hwirq(d); if (hw_irq >= IRQC_TINT_START && hw_irq < IRQC_NUM_IRQ) { - struct rzg2l_irqc_priv *priv = irq_data_to_priv(d); u32 offset = hw_irq - IRQC_TINT_START; u32 tssr_offset = TSSR_OFFSET(offset); u8 tssr_index = TSSR_INDEX(offset); u32 reg; raw_spin_lock(&priv->lock); + if (enable) + rzg2l_irqc_unmask_once(priv, hw_irq); + else + rzg2l_irqc_mask_once(priv, hw_irq); reg = readl_relaxed(priv->base + TSSR(tssr_index)); if (enable) reg |= TIEN << TSSEL_SHIFT(tssr_offset); @@ -157,6 +253,13 @@ static void rzg2l_tint_irq_endisable(struct irq_data *d, bool enable) reg &= ~(TIEN << TSSEL_SHIFT(tssr_offset)); writel_relaxed(reg, priv->base + TSSR(tssr_index)); raw_spin_unlock(&priv->lock); + } else { + raw_spin_lock(&priv->lock); + if (enable) + rzg2l_irqc_unmask_once(priv, hw_irq); + else + rzg2l_irqc_mask_once(priv, hw_irq); + raw_spin_unlock(&priv->lock); } } @@ -324,8 +427,8 @@ static struct syscore_ops rzg2l_irqc_syscore_ops = { static const struct irq_chip irqc_chip = { .name = "rzg2l-irqc", .irq_eoi = rzg2l_irqc_eoi, - .irq_mask = irq_chip_mask_parent, - .irq_unmask = irq_chip_unmask_parent, + .irq_mask = rzg2l_irqc_mask, + .irq_unmask = rzg2l_irqc_unmask, .irq_disable = rzg2l_irqc_irq_disable, .irq_enable = rzg2l_irqc_irq_enable, .irq_get_irqchip_state = irq_chip_get_parent_state, @@ -401,7 +504,16 @@ static int rzg2l_irqc_parse_interrupts(struct rzg2l_irqc_priv *priv, return 0; } -static int rzg2l_irqc_init(struct device_node *node, struct device_node *parent) +static const struct rzg2l_irqc_of_data rzg2l_irqc_mask_supported_data = { + .mask_supported = true, +}; + +static const struct rzg2l_irqc_of_data rzg2l_irqc_default_data = { + .mask_supported = false, +}; + +static int rzg2l_irqc_init(struct device_node *node, struct device_node *parent, + const struct rzg2l_irqc_of_data *of_data) { struct irq_domain *irq_domain, *parent_domain; struct platform_device *pdev; @@ -422,6 +534,8 @@ static int rzg2l_irqc_init(struct device_node *node, struct device_node *parent) if (!rzg2l_irqc_data) return -ENOMEM; + rzg2l_irqc_data->data = of_data; + rzg2l_irqc_data->base = devm_of_iomap(&pdev->dev, pdev->dev.of_node, 0, NULL); if (IS_ERR(rzg2l_irqc_data->base)) return PTR_ERR(rzg2l_irqc_data->base); @@ -472,8 +586,21 @@ static int rzg2l_irqc_init(struct device_node *node, struct device_node *parent) return ret; } +static int __init rzg2l_irqc_default_init(struct device_node *node, + struct device_node *parent) +{ + return rzg2l_irqc_init(node, parent, &rzg2l_irqc_default_data); +} + +static int __init rzg2l_irqc_mask_supported_init(struct device_node *node, + struct device_node *parent) +{ + return rzg2l_irqc_init(node, parent, &rzg2l_irqc_mask_supported_data); +} + IRQCHIP_PLATFORM_DRIVER_BEGIN(rzg2l_irqc) -IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_init) +IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_default_init) +IRQCHIP_MATCH("renesas,r9a07g043f-irqc", rzg2l_irqc_mask_supported_init) IRQCHIP_PLATFORM_DRIVER_END(rzg2l_irqc) MODULE_AUTHOR("Lad Prabhakar "); MODULE_DESCRIPTION("Renesas RZ/G2L IRQC Driver"); From patchwork Wed Apr 3 20:35:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13616670 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1E87CD1297 for ; Wed, 3 Apr 2024 20:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4u3XXKIKwOWWnIBvzvm+JeURJ3IwJFvRD1FjErUmWhM=; b=LFg1CtHhId7/e+ OvEQst7pwu5wxUCHrgfiNI/DMlp/Rku/2OXS9KojcBOwpkOUsNuWdiLfsc1HCaSfjRVp7v/RnBen/ kj8AxjHRWwV33roetePOXOIX16BB5KaL+d6zFWTNqTxOcBh7h2o0dLbEmNHvqasRBlafbD1B6Kvs9 HgWyZ6X84w1CLmOCbfAFpEHazMDVVuHdSMpCS+djpJ/KTNgVswiCYR2a9RqNfNmoCrAwU0ZuXaFRh fgmLDwEYvtLT4SRH8ZHOMUsBzayc9rIxflPd5Znxr2qynqTkZNvfninXHEkhpQJIO2L6SJ5VsygO2 aHXjEuwwPyX3RKFHG3hQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7Lf-000000006t9-1hht; Wed, 03 Apr 2024 20:36:43 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7Lb-000000006qs-0SAP for linux-riscv@lists.infradead.org; Wed, 03 Apr 2024 20:36:40 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4155baa696eso1700655e9.2 for ; Wed, 03 Apr 2024 13:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712176597; x=1712781397; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WIhSDuKRxtReMhoBOeQdaM5SSml7tb0U0bOehxLDLJ0=; b=E8+ZBijY/sW0SOIwmg9MBiycM2mpiKN6A2HqBB/JQaQjGcOahlW/UtJV4SGtGJsPPo +4UdmVAT1JOdcYZb7gqifDtOn7MNtQGyVn2NVu/lT2VgDdEfG1T/iYphxXcxVue02yiW vip1dahdh3T2Q/0xFd5QwfTAQYd9NylCRtDgFKJixAW3MNJkDj01pxf7LKTakl1VbbrS ALTcAAxZZJy9TIGgkzT3L5IKugAN1PNmpUdLl/uSYQq5GmtV0NXeGv/NgO3ic1Q/kqAV jwW3IoL+EjRonvEp/VXbAf94ZmNCb0riZ0oPRc2/GWArcoAs7qeOP0WLLlyEOaMyg14e 0AWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712176597; x=1712781397; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WIhSDuKRxtReMhoBOeQdaM5SSml7tb0U0bOehxLDLJ0=; b=btZJZbRHD7zrc3g2eIXkJxxecuhQScR80rMfPjp5VbiUEY37R8Eo3M15/Bx0kIst3F azVYKOurjXftu9r4UwIiMgPwmupRf1jBwRPNKG7WLefuDNQLHTaqKsv1bXKFJyYK8uv7 b3bcT/vqs6bFMrcaxThkWGBTWLgwywmB616nQblzmqCrT84PeQPyJrK/bO02qNySpoTD hSbSwlo22I11XDTdK5W2PEXTUP0fkPZFUd5onHjmZGpGG+RlURCejjM4X0PX9+emOOBC KZ7F/iTORBNULPHTTt2jhVW5r4ipzuf5K0ZcgwohhiLq6eYFPJOVOiTNiAHiNXDvFxsz OVtQ== X-Forwarded-Encrypted: i=1; AJvYcCWZ7PcAx7qUImiiHSNx0ISPMcAFmcmRgEd9q00lOX7HtIOd8sRtlGUck6jKXuwbYtquofnHDwRkEj56DRLEaQiIpnMr/4Yakgn11FesmPYz X-Gm-Message-State: AOJu0YwaSVc5NRPOBpWHWZcQtD+pCKqeSq7OW49lNwWgleJx8fOP3gnk ZRXqx/VI5rW0OxdT4llN1d1PaKFmW+S1Baccx2g0PZKr+3Dm9sSK X-Google-Smtp-Source: AGHT+IEBf4EI90GwLyWaZhn9tNMQRNMUHp0wiyU3VQSutIIF0BpUCmJKhP6GflB/sJ4C1FaR3PGQ1Q== X-Received: by 2002:a05:600c:1d27:b0:415:4824:3686 with SMTP id l39-20020a05600c1d2700b0041548243686mr471596wms.25.1712176596939; Wed, 03 Apr 2024 13:36:36 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:5eb:3d93:f2b6:25e8]) by smtp.gmail.com with ESMTPSA id p4-20020a05600c468400b00415f496b9b7sm244910wmo.39.2024.04.03.13.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 13:36:36 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-riscv@lists.infradead.org, Prabhakar , Lad Prabhakar Subject: [PATCH v2 3/5] riscv: dts: renesas: r9a07g043f: Add IRQC node to RZ/Five SoC DTSI Date: Wed, 3 Apr 2024 21:35:01 +0100 Message-Id: <20240403203503.634465-4-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_133639_193935_8853A292 X-CRM114-Status: UNSURE ( 9.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Add the IRQC node to RZ/Five (R9A07G043F) SoC DTSI. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven --- v1->v2 - Dropped using SOC_PERIPHERAL_IRQ() macro --- arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 75 +++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi index f35324b9173c..e0ddf8f602c7 100644 --- a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi @@ -54,6 +54,81 @@ &soc { dma-noncoherent; interrupt-parent = <&plic>; + irqc: interrupt-controller@110a0000 { + compatible = "renesas,r9a07g043f-irqc"; + reg = <0 0x110a0000 0 0x20000>; + #interrupt-cells = <2>; + #address-cells = <0>; + interrupt-controller; + interrupts = <32 IRQ_TYPE_LEVEL_HIGH>, + <33 IRQ_TYPE_LEVEL_HIGH>, + <34 IRQ_TYPE_LEVEL_HIGH>, + <35 IRQ_TYPE_LEVEL_HIGH>, + <36 IRQ_TYPE_LEVEL_HIGH>, + <37 IRQ_TYPE_LEVEL_HIGH>, + <38 IRQ_TYPE_LEVEL_HIGH>, + <39 IRQ_TYPE_LEVEL_HIGH>, + <40 IRQ_TYPE_LEVEL_HIGH>, + <476 IRQ_TYPE_LEVEL_HIGH>, + <477 IRQ_TYPE_LEVEL_HIGH>, + <478 IRQ_TYPE_LEVEL_HIGH>, + <479 IRQ_TYPE_LEVEL_HIGH>, + <480 IRQ_TYPE_LEVEL_HIGH>, + <481 IRQ_TYPE_LEVEL_HIGH>, + <482 IRQ_TYPE_LEVEL_HIGH>, + <483 IRQ_TYPE_LEVEL_HIGH>, + <484 IRQ_TYPE_LEVEL_HIGH>, + <485 IRQ_TYPE_LEVEL_HIGH>, + <486 IRQ_TYPE_LEVEL_HIGH>, + <487 IRQ_TYPE_LEVEL_HIGH>, + <488 IRQ_TYPE_LEVEL_HIGH>, + <489 IRQ_TYPE_LEVEL_HIGH>, + <490 IRQ_TYPE_LEVEL_HIGH>, + <491 IRQ_TYPE_LEVEL_HIGH>, + <492 IRQ_TYPE_LEVEL_HIGH>, + <493 IRQ_TYPE_LEVEL_HIGH>, + <494 IRQ_TYPE_LEVEL_HIGH>, + <495 IRQ_TYPE_LEVEL_HIGH>, + <496 IRQ_TYPE_LEVEL_HIGH>, + <497 IRQ_TYPE_LEVEL_HIGH>, + <498 IRQ_TYPE_LEVEL_HIGH>, + <499 IRQ_TYPE_LEVEL_HIGH>, + <500 IRQ_TYPE_LEVEL_HIGH>, + <501 IRQ_TYPE_LEVEL_HIGH>, + <502 IRQ_TYPE_LEVEL_HIGH>, + <503 IRQ_TYPE_LEVEL_HIGH>, + <504 IRQ_TYPE_LEVEL_HIGH>, + <505 IRQ_TYPE_LEVEL_HIGH>, + <506 IRQ_TYPE_LEVEL_HIGH>, + <507 IRQ_TYPE_LEVEL_HIGH>, + <57 IRQ_TYPE_LEVEL_HIGH>, + <66 IRQ_TYPE_EDGE_RISING>, + <67 IRQ_TYPE_EDGE_RISING>, + <68 IRQ_TYPE_EDGE_RISING>, + <69 IRQ_TYPE_EDGE_RISING>, + <70 IRQ_TYPE_EDGE_RISING>, + <71 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "nmi", + "irq0", "irq1", "irq2", "irq3", + "irq4", "irq5", "irq6", "irq7", + "tint0", "tint1", "tint2", "tint3", + "tint4", "tint5", "tint6", "tint7", + "tint8", "tint9", "tint10", "tint11", + "tint12", "tint13", "tint14", "tint15", + "tint16", "tint17", "tint18", "tint19", + "tint20", "tint21", "tint22", "tint23", + "tint24", "tint25", "tint26", "tint27", + "tint28", "tint29", "tint30", "tint31", + "bus-err", "ec7tie1-0", "ec7tie2-0", + "ec7tiovf-0", "ec7tie1-1", "ec7tie2-1", + "ec7tiovf-1"; + clocks = <&cpg CPG_MOD R9A07G043_IAX45_CLK>, + <&cpg CPG_MOD R9A07G043_IAX45_PCLK>; + clock-names = "clk", "pclk"; + power-domains = <&cpg>; + resets = <&cpg R9A07G043_IAX45_RESETN>; + }; + plic: interrupt-controller@12c00000 { compatible = "renesas,r9a07g043-plic", "andestech,nceplic100"; #interrupt-cells = <2>; From patchwork Wed Apr 3 20:35:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13616671 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F578CD1288 for ; Wed, 3 Apr 2024 20:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RMT/CqGlgbtayLmRiXOsiE2NJ5LfjD4sFtoXZtu+5vY=; b=W7hviEpnkqP+f+ z0LXh2TuXzharKnyiZe1Mj13jIZCbEdpsE/aaRGANjvsAOwg9DieCeVOoaXmw8d88ZxjG1EAdmh8V RAdXKXJtr5qsNE77dqnPsZhjmL0R5CEMYl2kaUTz86rFTCVD1bqRIklLLqBKvJ025wjVWwIhtNTFk rcxfXWK8cfxDjNa/XRNb5dihLgOaYjtXoJorpLabstm1voKMaZ1u15YjyRbJ2ES84+sy+h0IIhfc4 YasDeTed62orUbPgZXyzIrRCM36xmliTNHLmhZRoRnMYF2xV6dp5bjCoihzVeQwfbt2GC6KoQJ9nZ cSVJ5PwBHzbs7LrrUEFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7Lg-000000006u3-15dQ; Wed, 03 Apr 2024 20:36:44 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7Lc-000000006rH-149Q for linux-riscv@lists.infradead.org; Wed, 03 Apr 2024 20:36:41 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4162a3e2d9eso299625e9.3 for ; Wed, 03 Apr 2024 13:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712176598; x=1712781398; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p/LXAek9DTip2Fdt/jPhnz1YflAKKdWZVYvtfB/2Zns=; b=XuExxWJ7FvuHCSeINfRO+egOyNAB2CjipTtDo5UZK+P4qMG4ZJokA910rDm4WeMO6k QRykFxDzyzBtzpmUPTnomsUxuNDwOZQr3ChJf8GC7+1AeT5UIhrHIMrTj8BZGkWiXlq+ Nw/FzVbIrHsnhfj4y2JeV7hLGhWqq8pGsgu3+N7+wa4nvsc/PB9LX069ye/AXddTaS+u RMLsXzEpgFdAL5vzx292DXOVZgPPXbxaLqL2uIs+uqdK18sxL83fimdIOLIZZDkZzp88 T1mB+CdCMKcoZGmegNPwmbvEgaha4dG4ZHhTNQgJLDySSbwkr8613BPI3ig0Uw85iJd3 0deQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712176598; x=1712781398; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p/LXAek9DTip2Fdt/jPhnz1YflAKKdWZVYvtfB/2Zns=; b=n/q5S3KUnVOStovM4HZb3CctMLVjRF/1mtrA88Ba90bCMTZNeoLJUR7zr4L68fNpWb OJSu978Pd9OUeSAEr1/ab0GsUjKz5jTNuGOOG0f66wCO2lIWXTXQbbF6G42b7164bBXG OaQhEe0mrXvOWeN/pSYcIOdRZbUrMitwvlikzrvjGpZzr1QQOoZV48mlm0IPRMsfsset ZRW6vLAYyiOQaHS1ablFSG/V8RLTVhrC6I/2DeUCc4J+RKx5jV2zTkoCoHzHq0egk9IZ CFjUNDcYL5t7NhYfYW8Tm3b7zKwWOPFQHOz7z2M+hqb7wWlIo4kbm5plkzwlXtXX4fTe icWw== X-Forwarded-Encrypted: i=1; AJvYcCXUwjaJmbh77zoe3J5qEa4t9/a7iVChyn2iFt8PgZI6w9V2OUb6YYdzR8GO0tQSlDDgvU/HVumyuq8KeBOvk7i4kypqKQ4mMKZ51Jf/h6ES X-Gm-Message-State: AOJu0Yxg1LE4drHBDvNqTc8S7t/KfJsEEzqRjsmMjTX+7SXndv/wzQGV 3e2wFcZFbUPIjTX5rzfm24xmt+NNwQmTtgT/SnpsExqpGOLG9/5p X-Google-Smtp-Source: AGHT+IGyJCnA6zLH2lUVZ2qdR5AHvakpNrLQ0l/p+xtJ4HL1Pvgl52IInn/oXMhJtKGphOIkGjoIVQ== X-Received: by 2002:a05:600c:d1:b0:414:9072:98dc with SMTP id u17-20020a05600c00d100b00414907298dcmr658973wmm.41.1712176598262; Wed, 03 Apr 2024 13:36:38 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:5eb:3d93:f2b6:25e8]) by smtp.gmail.com with ESMTPSA id p4-20020a05600c468400b00415f496b9b7sm244910wmo.39.2024.04.03.13.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 13:36:37 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-riscv@lists.infradead.org, Prabhakar , Lad Prabhakar Subject: [PATCH v2 4/5] arm64: dts: renesas: r9a07g043: Move interrupt-parent property to common DTSI Date: Wed, 3 Apr 2024 21:35:02 +0100 Message-Id: <20240403203503.634465-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_133640_318073_538BDDA9 X-CRM114-Status: GOOD ( 10.79 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Now that we have added support for IRQC to both RZ/Five and RZ/G2UL SoCs we can move the interrupt-parent for pinctrl node back to the common shared r9a07g043.dtsi file. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven --- v1->v2 - Included RB tag from Geert --- arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi index 766c54b91acc..6212ee550f33 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi @@ -598,6 +598,7 @@ pinctrl: pinctrl@11030000 { gpio-ranges = <&pinctrl 0 0 152>; #interrupt-cells = <2>; interrupt-controller; + interrupt-parent = <&irqc>; clocks = <&cpg CPG_MOD R9A07G043_GPIO_HCLK>; power-domains = <&cpg>; resets = <&cpg R9A07G043_GPIO_RSTN>, diff --git a/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi b/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi index 964b0a475eee..165bfcfef3bc 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g043u.dtsi @@ -54,10 +54,6 @@ timer { }; }; -&pinctrl { - interrupt-parent = <&irqc>; -}; - &soc { interrupt-parent = <&gic>; From patchwork Wed Apr 3 20:35:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13616669 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50749CD129C for ; Wed, 3 Apr 2024 20:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c2ApldK3eZgeHMlPbJw1iaHde3QZtDeONihGA5IaOds=; b=zMbZa4t/pzsGlf w0qkyhoqdCJweMduIHJtdle/8Hpm3fH0fylYRciNs3uXh9ou7lJsz9bnky72+1Na6txjtglSGIyKZ fesc2pznD8PT4vXYg8IG5uQuLh1WqieBgkFsLLfCqHqI7a9INMVOLGrdr8PpDe+wswxVLmCsdSbkU qZ8V+Yrg2iqOCPE0nypfrsq+6nxoy6BpbIMe5WfnEKk2aUz9rBLfHjkWEqqOctn7zZMl9S6v6OVyz y7A0wycV0OUz3+y8Ctvf6vmyTzVsQrSEBWM5UtReBn2JA8NiTGBPJozb7PJjO1UrUPHUxh2MHXMtG 9xJnMt/dWAhEDrE9O6xQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7Lh-000000006uT-0w7V; Wed, 03 Apr 2024 20:36:45 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs7Ld-000000006re-1wm3 for linux-riscv@lists.infradead.org; Wed, 03 Apr 2024 20:36:43 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-33ddd1624beso129683f8f.1 for ; Wed, 03 Apr 2024 13:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712176599; x=1712781399; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jSGypoDfqpqf30JRW1cSjKb3kn4Y8om8katFtm1k9j8=; b=UhIe0rx7Dp42bMha+85u5fT+pR7Ar/Czmt+c9xoMJ4C43UC2HCsAGG2jd4IAqdgwQT XGEMAgjDRK4jzJkbkq/ybrTGv8yADVno+FoVMCWth8WBjwPg3LR91Gw1pKZQIzSZQ2Ku u8di1o3I0keWJhiaJ9LPF+cKykRXuwqLo4oLqgOKbsWg+VHlYoYwz1ZNO4muu17mqVlz H8q7i8+HHNhdQYdTwzy3JnEMsjx4EmSWXBzHI3rYCSwsUUsdpYMXM5GbLntdxrXNYg9O RMiTTSOsskY2sWnc2FcnKloFuWVI0aaiAkZkNWthD/Dzz9l9KalX1zSqpOhTTpYb8gO3 KSjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712176599; x=1712781399; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jSGypoDfqpqf30JRW1cSjKb3kn4Y8om8katFtm1k9j8=; b=tynxTDBdFjwN0nonfuiVjH1TKrbhpW0ecKfRd9T+fIfBIRbb79h8eGZUKefkPDlbqb cwtFwn6ilj7r6tn3XQVsvf5TIJsMftAExrFxRgquCcmC8O6lxrKAT57NHS9vznMiQx2W 5Gwi+nzNHm/NfYTpUJq2gk+4jrgA3T4efvp08Gjvqni3K1jQ5YNiwJMCUpDaGLHwFURe MD+HwDisx6coPkmFocBNAk9BRQHiaEtoNcFrAq22v8UUjvvozcPZhyaZOLqQ9j29Q2Ij dN3c4pqt7av5Ekcdw0qu0XmIrV/CgmXPRs6nrFoCesGWeL7ichjIaDzWb9dw45jDoh5G ly4w== X-Forwarded-Encrypted: i=1; AJvYcCV7OGrLQJQ6vEJx37Z8JuCzzL+/Yuq4VFTa2Hi1rn7P6yG7HIY2D0VWIj8k3bCzJSPU9bBcrgNpv5iDpD1IJz0jwiMFSSN5VlT9lLKj+9PK X-Gm-Message-State: AOJu0YzSf6fOzDNZ6Td1cgiyCZMK254ncFHrbfCokKqKZm+CBnyQbsXG PXAFlpd3X6v6is5wTkBoY1JVTbWSA0ol03slHrADuHVmKCp4l4iG X-Google-Smtp-Source: AGHT+IFyZ/P7OD6dXKo56fesVxWbcmlAoQodU4rrW7wCYbFjzNMLINpZAc8FOrmJHkASHxkvyr9Gjg== X-Received: by 2002:a5d:5447:0:b0:343:7f4b:6da5 with SMTP id w7-20020a5d5447000000b003437f4b6da5mr2931617wrv.17.1712176599471; Wed, 03 Apr 2024 13:36:39 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:5eb:3d93:f2b6:25e8]) by smtp.gmail.com with ESMTPSA id p4-20020a05600c468400b00415f496b9b7sm244910wmo.39.2024.04.03.13.36.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 13:36:38 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-riscv@lists.infradead.org, Prabhakar , Lad Prabhakar Subject: [PATCH v2 5/5] riscv: dts: renesas: rzfive-smarc-som: Drop deleting interrupt properties from ETH0/1 nodes Date: Wed, 3 Apr 2024 21:35:03 +0100 Message-Id: <20240403203503.634465-6-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240403203503.634465-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_133641_541938_84D7F6A8 X-CRM114-Status: UNSURE ( 8.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Now that we have enabled IRQC support for RZ/Five SoC switch to interrupt mode for ethernet0/1 PHYs instead of polling mode. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven --- v1->v2 - Included RB tag from Geert --- .../riscv/boot/dts/renesas/rzfive-smarc-som.dtsi | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi b/arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi index 72d9b6fba526..86b2f15375ec 100644 --- a/arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi +++ b/arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi @@ -7,22 +7,6 @@ #include -#if (!SW_ET0_EN_N) -ð0 { - phy0: ethernet-phy@7 { - /delete-property/ interrupt-parent; - /delete-property/ interrupts; - }; -}; -#endif - -ð1 { - phy1: ethernet-phy@7 { - /delete-property/ interrupt-parent; - /delete-property/ interrupts; - }; -}; - &sbc { status = "disabled"; };