Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3791652rwr; Sun, 7 May 2023 20:24:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6q7luPfoVq7vf+saRVFrSNzVcucI5Ly1JnSVO00eer4SAtaxszdxR/BM8Y7bTfkXeEo4HN X-Received: by 2002:a05:6a00:989:b0:62d:d045:392 with SMTP id u9-20020a056a00098900b0062dd0450392mr13382061pfg.32.1683516251412; Sun, 07 May 2023 20:24:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683516251; cv=pass; d=google.com; s=arc-20160816; b=n0Ewb+WPpFWABeExvRQtVQQ+HquOJLGKba/J/6t0ZSOPvlaIxWNOst4NUrE7hNoY8c O2SF215VkGGSFxr6nShIEAZKwf2Z+wKhrL/Q5YLlpji0CUQQiGVxTQ0uR1k7fIlNrpPo czGTg/B3h/FoSBqeD7+vgnOLoUlB7rjssa2eNcjRPaWX7ngxz17XjvG2UaK0njgLqMa9 Gu7UYgKf2jZSoNK0bHyjv86dUlv0Bf6EIN5gUectMHLv+lrctPpx4ES71YpkM/3YRnBs dMtUPA05HXLBLzlRAKhnF2Bi/q//w1OBH1jJULzhYJbmz0WfYaYtMlUB4Wm847vI4szA pIQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:organization:references:in-reply-to:date :cc:to:from:subject:message-id:dkim-signature; bh=qnDzkRSag6SxflxnrB+gJTuVsWsOkNdIPE1k2QWE8XE=; b=eQbPmdFztVDLcLqDgxOoPFfA92bX0MJL0P6FRsTQ7ITKHp2RwoW2vMl37vjBVahdp+ xjkcY1JYFNjTyhXI+4czbxzZAlwsscyfvD8SqKAIyPOIO+lul6NQKwebkb+QK31ZuNbg iRBblA+vXfTOd1iVcofj7KQc0O9UkMX3gb57gDyQmimUMrIRzBYkohHiNKlHdJSKRzqd IlOW8ho7MCA85Al7FvczIdLRs9KJyeKWPCEXe7hTu2d3nJ8W4Pc7zS4OHgIDsc8+4fSj HtnOIAqr2yvG9TXKXedu/AI42KI7CtAe7wmcNb600HqCG4V6zCfqqfs0OuJkeWKtKYgf IyDQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail header.b=TzPxT1lM; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020aa78ec2000000b00643c4d0d0f5si4232663pfr.39.2023.05.07.20.23.57; Sun, 07 May 2023 20:24:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail header.b=TzPxT1lM; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232167AbjEHDPM (ORCPT + 99 others); Sun, 7 May 2023 23:15:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232152AbjEHDPJ (ORCPT ); Sun, 7 May 2023 23:15:09 -0400 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B652083DE for ; Sun, 7 May 2023 20:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683515679; cv=none; d=zohomail.com; s=zohoarc; b=l9Yk2ZpIGQ75skWpiIgtduLusGE0oPB3mXGTsifKZOd4htya3Lqri6vqKzS+RAv0h8tGa6qEoIzSUPoHrga+izsHhKMJAhvntlkmkHzigs8jpJwMJ8NioaVFqypgoLjUA6GSxNGvaR6aa7OE90VOs0bfyVuOYACp6DntwGfvxsw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683515679; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=qnDzkRSag6SxflxnrB+gJTuVsWsOkNdIPE1k2QWE8XE=; b=RUnwG9k5DIpDNtpbg3Bo0K5nvSIveaan3d38/FCtTLP4mdnPLHeUOrJ7MLyOAiPSgdnJKxKfQkiHuadbVtXbg059Vy2H5ImNegQZwQkMxUx8QJCmuu1rKZFBgJzS5SkWqDAZ6md27ajQirnwbmN66nnfamsAcsLCj4yYoCCWliU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1683515679; s=zmail; d=icenowy.me; i=uwu@icenowy.me; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To; bh=qnDzkRSag6SxflxnrB+gJTuVsWsOkNdIPE1k2QWE8XE=; b=TzPxT1lMzDl+M0OheL8u2UY+r17jtv5k9D2Ui8pLXoO6w0j+soRqNs2YdOAYiXsE 6qCNPWUjcfS/lE7tROLVaGJYcWNlWKc6yn5m5128QFJatuU/Ei+0jx7MDktcY8Rd9Ld lQTTX2V3CI6y7FFBdMs7qDn9qLnUQgOTXw/hzWuk= Received: from edelgard.fodlan.icenowy.me (120.85.98.36 [120.85.98.36]) by mx.zohomail.com with SMTPS id 1683515678721325.31977442907953; Sun, 7 May 2023 20:14:38 -0700 (PDT) Message-ID: <56489d3f1b23a90baf3ef024da09b4c8c02a2204.camel@icenowy.me> Subject: Re: [PATCH 1/5] irqchip/sifive-plic: Support T-HEAD's C910 PLIC From: Icenowy Zheng To: Jisheng Zhang , Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Palmer Dabbelt , Paul Walmsley , Albert Ou Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren Date: Mon, 08 May 2023 11:14:32 +0800 In-Reply-To: <20230507182304.2934-2-jszhang@kernel.org> References: <20230507182304.2934-1-jszhang@kernel.org> <20230507182304.2934-2-jszhang@kernel.org> Organization: Anthon Open-Source Community Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =E5=9C=A8 2023-05-08=E6=98=9F=E6=9C=9F=E4=B8=80=E7=9A=84 02:23 +0800=EF=BC= =8CJisheng Zhang=E5=86=99=E9=81=93=EF=BC=9A > The T-HEAD's C910 PLIC still needs the delegation bit settingto allow > access from S-mode, but it doesn't need the edge quirk. No, the PLIC controller seems to be the same between C906 and C910, which has level/edge selectable via external signal. See openc906 and openc910 repositories, especially the documents with it: =E7=8E=84=E9=93=81C9{06,10}=E9=9B=86=E6=88=90=E6=89=8B=E5=86=8C.pdf . In addition, such problem won't arise when the system uses only level- triggered interrupts. >=20 > Signed-off-by: Jisheng Zhang > --- > =C2=A0.../bindings/interrupt-controller/sifive,plic-1.0.0.yaml=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 | 4 > ++++ > =C2=A0drivers/irqchip/irq-sifive-plic.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 1 + > =C2=A02 files changed, 5 insertions(+) >=20 > diff --git a/Documentation/devicetree/bindings/interrupt- > controller/sifive,plic-1.0.0.yaml > b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic- > 1.0.0.yaml > index f75736a061af..64b43a3c3748 100644 > --- a/Documentation/devicetree/bindings/interrupt- > controller/sifive,plic-1.0.0.yaml > +++ b/Documentation/devicetree/bindings/interrupt- > controller/sifive,plic-1.0.0.yaml > @@ -62,6 +62,10 @@ properties: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 - starfive,jh7110-plic > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 - canaan,k210-plic > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - const: sif= ive,plic-1.0.0 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - items: > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - enum: > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 - thead,light-plic > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - const: thead,c9= 10-plic > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - items: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - enum: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 - allwinner,sun20i-d1-plic > diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq- > sifive-plic.c > index e1484905b7bd..71afa2a584d9 100644 > --- a/drivers/irqchip/irq-sifive-plic.c > +++ b/drivers/irqchip/irq-sifive-plic.c > @@ -569,6 +569,7 @@ static int __init plic_init(struct device_node > *node, > =C2=A0} > =C2=A0 > =C2=A0IRQCHIP_DECLARE(sifive_plic, "sifive,plic-1.0.0", plic_init); > +IRQCHIP_DECLARE(thead_c910_plic, "thead,c910-plic", plic_init); > =C2=A0IRQCHIP_DECLARE(riscv_plic0, "riscv,plic0", plic_init); /* for > legacy systems */ > =C2=A0 > =C2=A0static int __init plic_edge_init(struct device_node *node,