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=-4.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 E1262C41604 for ; Wed, 7 Oct 2020 15:55:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 835D821707 for ; Wed, 7 Oct 2020 15:55:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602086142; bh=BwlW5lM9IzbCgjSoHneqUDGEskMzMU8oFit0dRom6qQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=AYjr7hL5rnzkxOHYEMn7UWovITr1gPZsj0TnuKYYZOtFEGdW4vv9cT1SNK7ly8Hh0 JVXLePzk3s6NagkP58HykqF+Ww9EPzBMRkS5xxzyIapQ/GH3cf8TcHcohafwWjSKTW wJRm13j3navLFsRB6btGYeuc51rYGHaeAPYfdmj0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728862AbgJGPzj (ORCPT ); Wed, 7 Oct 2020 11:55:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:42834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728039AbgJGPzi (ORCPT ); Wed, 7 Oct 2020 11:55:38 -0400 Received: from localhost (unknown [122.171.222.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 28A1A20789; Wed, 7 Oct 2020 15:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602086138; bh=BwlW5lM9IzbCgjSoHneqUDGEskMzMU8oFit0dRom6qQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mn22y7qe1QHoIEmqTpxMYG9HpGyBe8aHPMOUHwXhWa4NPtifJ64ZVnq4fOsrMMqr9 7qarzrTuzl4U9wJ+hHvxIu+OrHmrSRrvaS/Cs/yehGegZAPojCHLw8ixU567cU8QDQ 7Rk39hq40P2dq69R8WE+Lq01fdYQAYYlQrdWUyYM= Date: Wed, 7 Oct 2020 21:25:33 +0530 From: Vinod Koul To: Peter Ujfalusi Cc: nm@ti.com, ssantosh@kernel.org, robh+dt@kernel.org, vigneshr@ti.com, dan.j.williams@intel.com, t-kristo@ti.com, lokeshvutla@ti.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH 01/18] dmaengine: of-dma: Add support for optional router configuration callback Message-ID: <20201007155533.GZ2968@vkoul-mobl> References: <20200930091412.8020-1-peter.ujfalusi@ti.com> <20200930091412.8020-2-peter.ujfalusi@ti.com> <20201007054404.GR2968@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 07-10-20, 11:08, Peter Ujfalusi wrote: > Not really. In DT an event triggered channel can be requested via router > (when this is used) for example: > > dmas = <&inta_l2g a b c>; > a - the input number of the DMA request in l2g > b - edge or level trigger to be selected > c - ASEL number for the channel for coherency > > The l2g router driver then translate this to: > <&main_bcdma 1 0 c> > 1 - Global trigger 0 is used by the DMA > 0 - ignored > c - ASEL number. > > The router needs to send an event which is going to be received by the > channel we have picked up, this event number can only be known when we > do have the channel. > > So the flow in this case: > router converts the dma_spec for the DMA, but it does not yet know what > is the event number it has to use. > The BCDMA driver will pick an available bchan and notes that the > transfers will be triggered by global event 0. > When we have the channel, the core saves the router information and > calls the device_router_config of BCDMA. > In there we call back to the router and give the event number it has to > use to send the trigger for the channel. Ah that is intresting, so you would call router driver foo_set_event() and would send the event number, why not call that API from alloc channel or even xlate? Why do you need new callback? Or did i miss something.. -- ~Vinod 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=-4.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 EA707C41604 for ; Wed, 7 Oct 2020 15:57:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6B1F7215A4 for ; Wed, 7 Oct 2020 15:57:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NuArnolK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mn22y7qe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B1F7215A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4cgsoUVyGpmpf6x24Lm/lAQxgMj+y+Hl25gez4Uy8S0=; b=NuArnolKMU50ccDZJfrDYfctR bnijYjrIxWtiG4PRG3Ig43pO/gwUGYQAA9dmPx56RFMs99CCwHhBPWtAisa1mQb5GrsetKVB42BLk anjYYx4VZWwZ3Uiu/CKvMDzuyuuVV69c71NAle4Ox5RzOKJeXvrWcB+sEP9KIj5ZoMCmKieBFncDF F7LOcOktSuP0Zf1IbAuIYjKPc/yw0pUsgAUkaotMX4lFrqAigWujfmtndZfau2JS9Pea6ltNVu+rg VT7KIPfBSs/Zl+TP7S7Yt3XUx4XiH66NC245DU2VTuKbGA55P60F5mipgcW1phb2DTibmNAGmkDlI dwq3r090Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQBn4-00016M-DI; Wed, 07 Oct 2020 15:55:42 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQBn1-000157-21 for linux-arm-kernel@lists.infradead.org; Wed, 07 Oct 2020 15:55:39 +0000 Received: from localhost (unknown [122.171.222.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 28A1A20789; Wed, 7 Oct 2020 15:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602086138; bh=BwlW5lM9IzbCgjSoHneqUDGEskMzMU8oFit0dRom6qQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mn22y7qe1QHoIEmqTpxMYG9HpGyBe8aHPMOUHwXhWa4NPtifJ64ZVnq4fOsrMMqr9 7qarzrTuzl4U9wJ+hHvxIu+OrHmrSRrvaS/Cs/yehGegZAPojCHLw8ixU567cU8QDQ 7Rk39hq40P2dq69R8WE+Lq01fdYQAYYlQrdWUyYM= Date: Wed, 7 Oct 2020 21:25:33 +0530 From: Vinod Koul To: Peter Ujfalusi Subject: Re: [PATCH 01/18] dmaengine: of-dma: Add support for optional router configuration callback Message-ID: <20201007155533.GZ2968@vkoul-mobl> References: <20200930091412.8020-1-peter.ujfalusi@ti.com> <20200930091412.8020-2-peter.ujfalusi@ti.com> <20201007054404.GR2968@vkoul-mobl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201007_115539_185424_B8A41345 X-CRM114-Status: GOOD ( 17.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nm@ti.com, devicetree@vger.kernel.org, vigneshr@ti.com, lokeshvutla@ti.com, linux-kernel@vger.kernel.org, t-kristo@ti.com, robh+dt@kernel.org, ssantosh@kernel.org, dmaengine@vger.kernel.org, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 07-10-20, 11:08, Peter Ujfalusi wrote: > Not really. In DT an event triggered channel can be requested via router > (when this is used) for example: > > dmas = <&inta_l2g a b c>; > a - the input number of the DMA request in l2g > b - edge or level trigger to be selected > c - ASEL number for the channel for coherency > > The l2g router driver then translate this to: > <&main_bcdma 1 0 c> > 1 - Global trigger 0 is used by the DMA > 0 - ignored > c - ASEL number. > > The router needs to send an event which is going to be received by the > channel we have picked up, this event number can only be known when we > do have the channel. > > So the flow in this case: > router converts the dma_spec for the DMA, but it does not yet know what > is the event number it has to use. > The BCDMA driver will pick an available bchan and notes that the > transfers will be triggered by global event 0. > When we have the channel, the core saves the router information and > calls the device_router_config of BCDMA. > In there we call back to the router and give the event number it has to > use to send the trigger for the channel. Ah that is intresting, so you would call router driver foo_set_event() and would send the event number, why not call that API from alloc channel or even xlate? Why do you need new callback? Or did i miss something.. -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel