From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1343EC43381 for ; Fri, 29 Mar 2019 02:39:06 +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 D68EC21850 for ; Fri, 29 Mar 2019 02:39:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="X/ZoUi+5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D68EC21850 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u+xHOFYsRNvA/8Sm6xTvLgjjd8OSZ0/xo/IgLcYpXC0=; b=X/ZoUi+5sqF5Nq ZRM4r4Or1+joSMxdInsw2WceMjCFGdK8lUI7P0TfGnEGhFAIKe+0aBCHt+3ueSlEkC2ex9N5pqtiM 9YdVdwmwsoE3xXW/rXRBCBoGFBTrH2LvUAr0BLgOmPOz7ixja55/xtv46/YEBQQr+YnDdgGqxyt/D gW3YPzgosNjghB2B9GwUZtRHMgYrK5ixWtIhETTyKGX2I+0vHsV92C5NYZdmcGDOBYgkQrF1PCZ4I JNPLOHrDQS3SF9VIVE42TLvTY94nKHEnfL+uGF0F6I0DB2QcLYX2xW64yqY1gSBv3Pco/Ooo7lsKO kZEzK5NqQM1XZm7zfDHQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9hQ6-0000L2-FI; Fri, 29 Mar 2019 02:39:02 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9hQ3-0000Jr-7M; Fri, 29 Mar 2019 02:39:00 +0000 X-UUID: 293e23a8d99243cebfe1aca30649e423-20190328 X-UUID: 293e23a8d99243cebfe1aca30649e423-20190328 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 629876823; Thu, 28 Mar 2019 18:38:55 -0800 Received: from MTKMBS01DR.mediatek.inc (172.21.101.111) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 28 Mar 2019 19:38:53 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01dr.mediatek.inc (172.21.101.111) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 29 Mar 2019 10:38:51 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 29 Mar 2019 10:38:51 +0800 Message-ID: <1553827131.12091.8.camel@mtksdaap41> Subject: Re: [PATCH v3 03/12] dt-binding: gce: add binding for gce event property From: Bibby Hsieh To: Rob Herring Date: Fri, 29 Mar 2019 10:38:51 +0800 In-Reply-To: <20190328184425.GA21602@bogus> References: <1553739573-19708-1-git-send-email-bibby.hsieh@mediatek.com> <1553739573-19708-4-git-send-email-bibby.hsieh@mediatek.com> <20190328184425.GA21602@bogus> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190328_193859_270272_CC716206 X-CRM114-Status: GOOD ( 20.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Nicolas Boichat , Philipp Zabel , srv_heupstream@mediatek.com, kendrick.hsu@mediatek.com, Daoyuan Huang , Sascha Hauer , Jassi Brar , linux-kernel@vger.kernel.org, Daniel Kurtz , YT Shen , CK HU , Dennis-YC Hsieh , linux-mediatek@lists.infradead.org, Houlong Wei , Sascha Hauer , Matthias Brugger , Jiaguang Zhang , Frederic Chen , linux-arm-kernel@lists.infradead.org, ginny.chen@mediatek.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Rob, Thanks for your review and comments. On Thu, 2019-03-28 at 13:44 -0500, Rob Herring wrote: > On Thu, Mar 28, 2019 at 10:19:24AM +0800, Bibby Hsieh wrote: > > Client hardware would send event to GCE hardware, > > so #event-cells, mediatek,gce-event-names, mediatek,gce-events. > > present the event. > > > > Signed-off-by: Bibby Hsieh > > --- > > Documentation/devicetree/bindings/mailbox/mtk-gce.txt | 17 ++++++++++++++--- > > 1 file changed, 14 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/mailbox/mtk-gce.txt b/Documentation/devicetree/bindings/mailbox/mtk-gce.txt > > index 1f7f8f2..2f175d6 100644 > > --- a/Documentation/devicetree/bindings/mailbox/mtk-gce.txt > > +++ b/Documentation/devicetree/bindings/mailbox/mtk-gce.txt > > @@ -21,12 +21,21 @@ Required properties: > > priority: Priority of GCE thread. > > atomic_exec: GCE processing continuous packets of commands in atomic > > way. > > +- #event-cells: Should be 1. > > + <&phandle event_number> > > + phandle: Label name of a gce node. > > + event_number: the event number defined in 'dt-bindings/gce/mt8173-gce.h' > > + or 'dt-binding/gce/mt8183-gce.h'. > > You only need to have a #*-cells if the number is variable. > I think #event-cells can be removed here.The cmdq_dev_get_event can be modified as: +u32 cmdq_dev_get_event(struct device *dev, const char *name) +{ + <... snip ...> + index = of_property_match_string(dev->of_node, + "mediatek,gce-event-names", + <... snip ...> + + if (of_property_read_u32_index(dev->of_node, "mediatek,gce-events", index, &result)) { + dev_err(dev, "can't parse gce-events property"); + + return -ENODEV; + } + + return result; +} +EXPORT_SYMBOL(cmdq_dev_get_event); > What are 'events' here? Sounds like interrupts or MSI? Yes, events is a kind of communicating method from the other hardware with GCE. It's likes interrupts. > > > > > Required properties for a client device: > > - mboxes: Client use mailbox to communicate with GCE, it should have this > > property and list of phandle, mailbox specifiers. > > - mediatek,gce-subsys: u32, specify the sub-system id which is corresponding > > to the register address. > > +Optional propertier for a client device: > > +- mediatek,gce-event-names: the event name can be defined by user. > > +- mediatek,gce-events: u32, the event number defined in > > + 'dt-bindings/gce/mt8173-gce.h' or 'dt-binding/gce/mt8183-gce.h'. > > > > Some vaules of properties are defined in 'dt-bindings/gce/mt8173-gce.h' > > or 'dt-binding/gce/mt8183-gce.h'. Such as sub-system ids, thread priority, event ids. > > @@ -40,6 +49,7 @@ Example: > > clocks = <&infracfg CLK_INFRA_GCE>; > > clock-names = "gce"; > > #mbox-cells = <3>; > > + #event-cells = <1>; > > }; > > > > Example for a client device: > > @@ -49,8 +59,9 @@ Example for a client device: > > mboxes = <&gce 0 CMDQ_THR_PRIO_LOWEST 1>, > > <&gce 1 CMDQ_THR_PRIO_LOWEST 1>; > > mediatek,gce-subsys = ; > > - mutex-event-eof = > - CMDQ_EVENT_MUTEX1_STREAM_EOF>; > > - > > + mediatek,gce-event-names = "rdma0_sof", > > + "rsz0_sof"; > > + mediatek,gce-events = <&gce CMDQ_EVENT_MDP_RDMA0_SOF>, > > + <&gce CMDQ_EVENT_MDP_RSZ0_SOF>; > > ... > > }; > > -- > > 1.9.1 > > -- Bibby _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel