Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp537697pxu; Wed, 7 Oct 2020 09:21:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE1t5NunZaMs9J+WKceQPqKPvyJRN3Mh1gb0eQd9MDH0EIodNYDEqaSlOOu/GL0kUver7w X-Received: by 2002:a17:906:a002:: with SMTP id p2mr3910851ejy.399.1602087667817; Wed, 07 Oct 2020 09:21:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602087667; cv=none; d=google.com; s=arc-20160816; b=GwwZzWntaW+Uooru9tSRqawFOrOt3gdbzFlbVyZechujyG/STY3gK8E2pzhuIb/pMq YaIiTTnuf7DQsy+nlUQG4egtlwVuA3pWgDdr8jIHrfQTSxe6gUg5i8zeDxzLkRO15nG0 f0eXH+43/2mNhbIVQZF9SaY29YBV6HcYeeIsjYjQK4+HzswCdhFyW8iTfd8XY2PhnZmT Te46gCFHBD3UndjPAVvOx9TotEg7GvSpaS+frACS2p1fTQift9W6j9l042oakUKXuV2I Ke1YRqfPGdmKTIdgqZ8xYFQz6aK9ctzSIGncC+fbjnwXK6GIXopDjtvXArF+X8ZlmA4m f9Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qtadrgJaC/bDWDK9OwnWYT1Bo/WmVo2fMG5IIYV8Zb8=; b=Hazh+CBOvE7KM5Idz6wk0+HyyHmdFP5FfhnwNK8bT/Ej0dHL3HTHhab3cONJM/A+gh x9JoGtwRwRQhadl5V9IbTHgjSTIyDJuW6oPkLny8pToYBBgrmqS4CxgAwCw4tS6Dh6Cl h+MQ4Seroq8IjsmE9/VIM28Ad1XxXBNYOej1J1Ad/XgHIszpNtoG42WeDtxXRa/SKx8l pn0ZxZBTrVu7rIYGWOLPBp2CMFzuPZ9ObK24FbwRoh5C/GOeYViMugzr4MV59/Lqtnx+ cBWx2M4i7Uys6wgsDInFUY4P0jEWvGIDYupFvHdLcJTqeUj9vJyoB/eaayDLtc0y7OGH FNSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mn22y7qe; 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 i12si1678338eje.580.2020.10.07.09.20.43; Wed, 07 Oct 2020 09:21:07 -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=default header.b=Mn22y7qe; 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 S1728867AbgJGPzj (ORCPT + 99 others); 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: linux-kernel@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