Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2615571pxb; Sun, 17 Oct 2021 20:35:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK1JDGG6Nx56qqLMMG8RfuL5Raivqmip3OtQT7D8zKp0RXSUblE+SREVNPNWcwwqreHSg0 X-Received: by 2002:a63:1cd:: with SMTP id 196mr21188978pgb.39.1634528147018; Sun, 17 Oct 2021 20:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528147; cv=none; d=google.com; s=arc-20160816; b=Dg3PbsTdsLJuCSFXyWPByJNTbs+I9fYIt4zfhG8yw+RYT0nSMNVcoMEG7fQIDrZNDs 3J4mdyuyPD4LZVg+TmAmnskCD0P2QtMU+5Gi0x8o73lszs0XdLYj1ONvfkHDNyCnPHsK A8gOhderDeKsQes5FWtHx5L0NLe4tfiZ0ttgqmDMnipveYTqqzK1lX86FpY5M2mByIQo U9qTajCRKvrEUkW39iTfBF0fY5AKUcdXg/WbN9ZW62oIG7DZoNGv9LQPJF4kqZ9dpn25 FgdWW7Du2vnqDhiqLDtcLGliRMQHMrk6u06zQmzGCew3oEj+5mD53gwgQjwnUTwG8NoV 1SEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bBS7Hm38aJkQuiAJmyWhbnHNoPgrkBIE2vWOYSL8wpw=; b=Gm+hYn2+ffJzpVfJVeaz4hXrWBaD/sYflZjWM1re6QFmHHHPkZoUyEmuFipFH6YCr6 dR1RyTvWOVmbpdeJwLVrWcHTcImoEzFufVPErqmLuBJImxUnEkAyBlg5azOH9FpkdKvo 99QuaYr3mzqv9aRJCYvGgG4UA6KrX+nn7d1Kyx7Jna/nXmrcmN92CzZDREBbw1u/Ca0Q bvTn1DZBahGi11Q/j67t5HHVUMSaG3hfwDLijIIGIjyknmhrE+bZzrsUMQ+ay/Di1YCX BNolpBPzm/Gl2uzU4PopFWD00cyBWTeYqTqdpyVy00X40/s2lLxa3nxxjo9dRVEPrMiw M7YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XeiaRhr3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w124si13071984pfw.314.2021.10.17.20.35.35; Sun, 17 Oct 2021 20:35:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XeiaRhr3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240468AbhJPM7M (ORCPT + 98 others); Sat, 16 Oct 2021 08:59:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:44288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240450AbhJPM7L (ORCPT ); Sat, 16 Oct 2021 08:59:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4FC276120A for ; Sat, 16 Oct 2021 12:57:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634389023; bh=NsinonKH119OjwifjZy82GsiqQzJfczn0ZJZxIQqkGQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XeiaRhr3wF7EzNe4FIC+GtRX7tvl7cBWvk560//gRZqKY4ASIGOng+wRLQ0SOY/6F /XV9L6EH5L+f9X+7EzVfjunNkXPMutK+Y/Z/xBGSV2hf5CmTKBc6zkJjD1LpPC8TIo a2j6ePFvhAXeLQdtCARYZ3WzXvgvCzRXB6NDR8f2yFtmD/eio3BfOjkO+od390vzhs nQw/s0d/OEwD9qe2VDv0ayntCHIB+zUPHZLPJMBkZQ+tXh/3RoFo66NxSIh8t5MRyk SrOsbK3XAC3yKdXcHBqe50NjFhKuhnzS9fOBr2Sw6ojGYrluRpC9fOr9Fm0PME8L47 1nLPeAVCFR32w== Received: by mail-ua1-f48.google.com with SMTP id u5so23329409uao.13 for ; Sat, 16 Oct 2021 05:57:03 -0700 (PDT) X-Gm-Message-State: AOAM5311ufag5gDuV+rr4+fEebjT6K6SAC76qgy9Dfqq0lBbe8QuPLkU gkUxs9XjkI6V8IhNtBIkmKV0LWTurYisnGtT0MA= X-Received: by 2002:a05:6102:32cd:: with SMTP id o13mr19996599vss.50.1634389022294; Sat, 16 Oct 2021 05:57:02 -0700 (PDT) MIME-Version: 1.0 References: <20211016032200.2869998-1-guoren@kernel.org> <20211016032200.2869998-3-guoren@kernel.org> <2216787.nSqPeTNalD@phil> In-Reply-To: <2216787.nSqPeTNalD@phil> From: Guo Ren Date: Sat, 16 Oct 2021 20:56:51 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V4 2/3] dt-bindings: update riscv plic compatible string To: Heiko Stuebner Cc: Anup Patel , Atish Patra , Marc Zyngier , Thomas Gleixner , Palmer Dabbelt , Rob Herring , Linux Kernel Mailing List , linux-riscv , Guo Ren , Palmer Dabbelt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 16, 2021 at 6:35 PM Heiko Stuebner wrote: > > Hi Guo, > > Am Samstag, 16. Oktober 2021, 05:21:59 CEST schrieb guoren@kernel.org: > > From: Guo Ren > > > > Add the compatible string "thead,c900-plic" to the riscv plic > > bindings to support allwinner d1 SOC which contains c906 core. > > The compatible strings sound good now, but some things below > > > > > Signed-off-by: Guo Ren > > Cc: Rob Herring > > Cc: Palmer Dabbelt > > Cc: Anup Patel > > Cc: Atish Patra > > > > --- > > > > Changes since V4: > > - Update description in errata style > > - Update enum suggested by Anup, Heiko, Samuel > > > > Changes since V3: > > - Rename "c9xx" to "c900" > > - Add thead,c900-plic in the description section > > --- > > .../interrupt-controller/sifive,plic-1.0.0.yaml | 11 ++++++++++- > > 1 file changed, 10 insertions(+), 1 deletion(-) > > > > 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 08d5a57ce00f..272f29540135 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 > > @@ -35,6 +35,12 @@ description: > > contains a specific memory layout, which is documented in chapter 8 of the > > SiFive U5 Coreplex Series Manual . > > > > + The C9xx PLIC does not comply with the interrupt claim/completion process defined > > + by the RISC-V PLIC specification because C9xx PLIC will mask an IRQ when it is > > + claimed by PLIC driver (i.e. readl(claim) and the IRQ will be unmasked upon > > + completion by PLIC driver (i.e. writel(claim). This behaviour breaks the handling > > + of IRQS_ONESHOT by the generic handle_fasteoi_irq() used in the PLIC driver. > > + > > maintainers: > > - Sagar Kadam > > - Paul Walmsley > > @@ -46,7 +52,10 @@ properties: > > - enum: > > - sifive,fu540-c000-plic > > - canaan,k210-plic > > - - const: sifive,plic-1.0.0 > > + - enmu: > > ^ spelling enum > > > + - sifive,plic-1.0.0 > > + - thead,c900-plic > > + - allwinner,sun20i-d1-plic > > but in general I'd think that you want something like > > compatible: > oneOf: > - items: > - enum: > - sifive,fu540-c000-plic > - canaan,k210-plic > - const: sifive,plic-1.0.0 > - items: > - enum: > - allwinner,sun20i-d1-plic > - const: thead,c900-plic > > Having only one item list would allow as valid combinations like > "sifive,fu540-c000-plic", "thead,c900-plic" when checking the schema. > > With the oneOf and separate lists we can make sure that such > "illegal" combinations get flagged by the dtbs_check > > [the enum with the single allwinner entry already leaves > room for later addition to the c900-plic variant] Thx, I'll fix it in the next version. another question: Is the allwinner_sun20i_d1_plic needed to IRQCHIP_DECLARE? +IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", thead_c900_plic_init); +IRQCHIP_DECLARE(allwinner_sun20i_d1_plic, "allwinner,sun20i-d1-plic", thead_c900_plic_init); > > Heiko > > > -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/