Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3463717pxb; Sun, 24 Oct 2021 02:55:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9ndPRDn10tfvkkA3a9d8nDUTg9IsVecI7AbbQHrlMhmL4a2p47wIP3waqMro/8OGl3C8D X-Received: by 2002:a65:448a:: with SMTP id l10mr8281628pgq.313.1635069347128; Sun, 24 Oct 2021 02:55:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635069347; cv=none; d=google.com; s=arc-20160816; b=VuCqDSOlbFVmNyW3Js8KnvyLxfbTE7hYJEmO8ZjP6MUN6BDI2HpgDCFzwWIJoAu3Nl bgeuv9C1Dg6MnsipTDgxhP3Rd9UfY5AiG3BT+/f0oEMBoDYbIhEOsCBJaxzRP7kz1hNR 7JYwf9M9OO5dC9+5V1TTCbNCPJNDddVRFZsF/R5NMcwqrvtAFVXD4KwHg0lxWbuYlt4W dpNaJeZ4GjWCzXTV+fMQfyI5p3qwbthyIsvwAE26GClAJzWNh+pUlajUxuXfmHDNJ6ft hQVx21NU9672JFRMuzRil8lDl8GYJAudceyMCkGe7a8wiqfMx6n1dS7v0RFVYsoHrFVq oL5g== 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=nQpfaG9o4fwydQFIzNppD0NQtdsJN/Eps88GAzG6FPw=; b=NabVzi76HX7RsE41vsJRp3XiEb4jupUfaVicvEmfraLEtemEYajnDYlnvIvXhmiYaA PNPzEXyfr/s+zGGgpGQt8OpE5zIlN/BXM8b+3maDsyOOwqzrzUOLXc7VYddWYe0JlzCl u4kH39z8hD9DXkKg0t56cpep6Lvu7WjYzAL7Ms9xfVeD4kfBS5brueP7amcS38iO+VNW Y8KhGBkH6fBqlBreEXnZTnWBZXRmxCgWxFBhVeGuh4Sfq6raUelMC1tt76bz+fmFtHDG LkIYxkpOmwzltKFIMi37cdgrT5qDIVPoITg3rQ5/thC3s2H7pnua9wvKz38X0AE7sV2H Q69Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=EVhMHB2+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s20si19107524pfk.186.2021.10.24.02.55.32; Sun, 24 Oct 2021 02:55: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=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=EVhMHB2+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230134AbhJXJzd (ORCPT + 99 others); Sun, 24 Oct 2021 05:55:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230021AbhJXJzc (ORCPT ); Sun, 24 Oct 2021 05:55:32 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF6E4C061764 for ; Sun, 24 Oct 2021 02:53:06 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id a16so5574427wrh.12 for ; Sun, 24 Oct 2021 02:53:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nQpfaG9o4fwydQFIzNppD0NQtdsJN/Eps88GAzG6FPw=; b=EVhMHB2++I1P/KeQUhPQX78UmV5QQUhowepGg7D0jWyRgLr5mlKzAXPdEPFl4eB9aC jonjFpzKtCZjsfCHKS3kXtq1/XruenMquRXSa/Pk2ffjWbLu9czDCAPuvV3JrjURoiWD 8VJaiB7bLwydhxEqlBoME4axkP5xzcp7yHCTqf+mSOUHlJsGYukCbxzpBNNIQ9eNzWr0 zYe79zjHzPaVw8T2JtQPNuOAe9qLr/3H7ypXEu0TIVBm9UPxl4Hac+yY+BU8Oo1UcS2L 0q/9VYXRGckMD8RBBWgzFMddncNunn9cyYaukYMERelDvsTOVRav/17F2rOqzJkAngHF wvqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nQpfaG9o4fwydQFIzNppD0NQtdsJN/Eps88GAzG6FPw=; b=nm9MCJBU3BurWFF9vReu4NOudP201MUmjIkjvcH52L78N96yUmuIKVZ/n+yzRzXTI0 0UR/fCJNDXuuYAhv7BUU7xYcLLp7q8a6W+PtVkytWJjjF2dPbKOgyRUp0IaSp3NuydCX jOsGAAyq09X/eIVJkhwrrdX9VDB7rktKA4ZOqH5B3FERKXHnEEKJ4VhH+OqEt6Evoqhm KQuYcRtKpQLUMsjPb6Cj92OQkFbLr+QTBR4D31xj02hrOVByZdeIXJoBJauUAFM8wjEG I8Uv80tBHybw8UXNYt5E/lW7XGGNq0iQhPB4uIW3qPvoeXLGiGWGFrw6dFWem5AFLT9E hEUw== X-Gm-Message-State: AOAM5312OYswFzJmdpNpwN3OjRVZdhzmQiKfdQU5s7pTrjw56vaYd3bu 436FKKBZreyfE1cUCj4dT9MZ/POdN+mEP2KapzhGnw== X-Received: by 2002:adf:ce09:: with SMTP id p9mr14555779wrn.363.1635069184969; Sun, 24 Oct 2021 02:53:04 -0700 (PDT) MIME-Version: 1.0 References: <20211024013303.3499461-1-guoren@kernel.org> <20211024013303.3499461-3-guoren@kernel.org> In-Reply-To: From: Anup Patel Date: Sun, 24 Oct 2021 15:22:53 +0530 Message-ID: Subject: Re: [PATCH V5 2/3] dt-bindings: update riscv plic compatible string To: Guo Ren Cc: Atish Patra , Marc Zyngier , Thomas Gleixner , Palmer Dabbelt , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Rob Herring , "linux-kernel@vger.kernel.org List" , linux-riscv , Guo Ren , Rob Herring , Palmer Dabbelt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 24, 2021 at 3:05 PM Guo Ren wrote: > > On Sun, Oct 24, 2021 at 5:18 PM Anup Patel wrote: > > > > On Sun, Oct 24, 2021 at 2:31 PM Guo Ren wrote: > > > > > > On Sun, Oct 24, 2021 at 3:35 PM Anup Patel wrote: > > > > > > > > On Sun, Oct 24, 2021 at 7:03 AM wrote: > > > > > > > > > > From: Guo Ren > > > > > > > > > > Add the compatible string "thead,c900-plic" to the riscv plic > > > > > bindings to support allwinner d1 SOC which contains c906 core. > > > > > > > > > > Signed-off-by: Guo Ren > > > > > Cc: Anup Patel > > > > > Cc: Atish Patra > > > > > Cc: Heiko Stuebner > > > > > Cc: Rob Herring > > > > > Cc: Rob Herring > > > > > Cc: Palmer Dabbelt > > > > > > > > > > --- > > > > > > > > > > Changes since V5: > > > > > - Add DT list > > > > > - Fixup compatible string > > > > > - Remove allwinner-d1 compatible > > > > > - make dt_binding_check > > > > > > > > > > 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 | 15 ++++++++++++--- > > > > > 1 file changed, 12 insertions(+), 3 deletions(-) > > > > > > > > > > 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..18b97bfd7954 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,10 @@ description: > > > > > contains a specific memory layout, which is documented in chapter 8 of the > > > > > SiFive U5 Coreplex Series Manual . > > > > > > > > > > + The thead,c900-plic couldn't complete masked irq source which has been disabled in > > > > > + enable register. Add thead_plic_chip which fix up c906-plic irq source completion > > > > > + problem by unmask/mask wrapper. > > > > > + > > > > > > > > This is an incomplete description about how T-HEAD PLIC is different from > > > > RISC-V PLIC. > > > > > > > > I would suggest the following: > > > > > > > > The T-HEAD C9xx SoC implements a modified/custom T-HEAD PLIC specification > > > > which will mask current IRQ upon read to CLAIM register and will unmask the IRQ > > > > upon write to CLAIM register. The thead,c900-plic compatible string > > > > represents the > > > > custom T-HEAD PLIC specification. > > > The patch fixup the problem that when "thead,c900-plic" couldn't > > > complete masked irq source which has been disabled. > > > > > > This patch is different from the last one in that there is no > > > relationship with the auto-mask feature. > > > > This patch adds compatible string for T-HEAD PLIC so it > > should describe how T-HEAD PLIC is different from RISC-V > > PLIC. The DT bindings document describes HW and not > > the software work-around implemented using DT bindings. > > > > Your irqchip patch uses T-HEAD PLIC compatible string to > > implement a work-around. > > > > In other words, this patch is different from the irqchip patch. > > How about below: > > The thead,c900-plic compatible string represents the custom T-HEAD > PLIC specification. > - It couldn't complete masked irq source which has been disabled in > enable register. Add thead_plic_chip which fix up c906-plic irq source > completion problem by unmask/mask wrapper. This first bullet is not required because it describes how it is used in irqchip driver to fix issues. This info has to go in your driver fix patch. > - It implements a modified/custom T-HEAD PLIC specification which > will mask current IRQ upon read to CLAIM register and will unmask the > IRQ upon write to CLAIM register. But the feature wasn't utilized by > software. Please don't advertise non-compliance with RISC-V PLIC spec as feature. What I had suggest before seems better. Regards, Anup > > > > > Regards, > > Anup > > > > > > > > > > > > > Regards, > > > > Anup > > > > > > > > > maintainers: > > > > > - Sagar Kadam > > > > > - Paul Walmsley > > > > > @@ -42,11 +46,16 @@ maintainers: > > > > > > > > > > properties: > > > > > compatible: > > > > > - items: > > > > > + oneOf: > > > > > + - items: > > > > > - enum: > > > > > - - sifive,fu540-c000-plic > > > > > - - canaan,k210-plic > > > > > + - sifive,fu540-c000-plic > > > > > + - canaan,k210-plic > > > > > - const: sifive,plic-1.0.0 > > > > > + - items: > > > > > + - enum: > > > > > + - allwinner,sun20i-d1-plic > > > > > + - const: thead,c900-plic > > > > > > > > > > reg: > > > > > maxItems: 1 > > > > > -- > > > > > 2.25.1 > > > > > > > > > > > > > > > > > -- > > > Best Regards > > > Guo Ren > > > > > > ML: https://lore.kernel.org/linux-csky/ > > > > -- > Best Regards > Guo Ren > > ML: https://lore.kernel.org/linux-csky/