Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3161302pxb; Mon, 9 Nov 2020 04:25:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDmdR5914scHmVk+Av8A25/JiOA7ZRZKP7ptKgKboi4YP7ghqKzdPKFd4YuGc/5SpqiYV3 X-Received: by 2002:a17:906:3a49:: with SMTP id a9mr14762771ejf.300.1604924702495; Mon, 09 Nov 2020 04:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604924702; cv=none; d=google.com; s=arc-20160816; b=vIMPRhDaZKBHX0urivXNbJI36s3Zhqt9uBg5n7UOesjtdIpPFvBykIa+js5i904Aek Q0XZWAVYr6EX6Kwe1DWbvOLwekOkpNHU7tIj/Yp839sDK3rO55pW0hvLdtyKJko6Fmai I6dTJwRQPq+9rcRFRvNbIqQXx095zbb1zQqy9DbcBclaXhfRYvJ+h5j6n6oCAKimfpwx orJPXOcg+J5udi0XQR3yBQCmTUPn59GbCPAXYDaaIkA/JkEvPM4CVwwSDtqhJbHPPJuT H7/0dKRplrp9yg3Fz8OM1H3Z9BzohpZImt/IedkZnlQLVWrrumy+AbBGwanOZwG0cHqE +OEg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sEZeFbmAMVxODQ0KPk9sB190DA3atT0CZJsbPuDcE6o=; b=zgy/enFr3WH67LUa2hf5T5D/9XyrX9f0rYsucCMHjySH5f6wTOtn/OSCf3cHW2+VFQ VUnVnZSFg+xZcEu9f7veGSZfGo8LmMWVxp9nY3N6MyUZtGbUWovTv8BXdftQkJ7OaLz/ Vmbl0p6ea7v2AwVc6vIZ0NUq9vmHXNRE//4DjdsiEfqTaIZg0dB4yQxEmRC0/f8oBKqD Yq7+v8el15RoF4HmkN0Vhr937kiXkjWKCQEcy986WTlA4ySjU5DiXoYhIuByqWjzZrCe twQjskx/LZrFmeIXG8Yii8GA7+aVPD1T6A6RxpUSK0uCv41l1Fb4RBpi5y8Ox5KP+vbD w5iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Oz7GIA73; 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 x24si6675222ejb.695.2020.11.09.04.24.39; Mon, 09 Nov 2020 04:25:02 -0800 (PST) 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=Oz7GIA73; 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 S1729672AbgKIMXM (ORCPT + 99 others); Mon, 9 Nov 2020 07:23:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:42688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbgKIMXL (ORCPT ); Mon, 9 Nov 2020 07:23:11 -0500 Received: from localhost (unknown [122.171.147.34]) (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 1ECBB206CB; Mon, 9 Nov 2020 12:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604924591; bh=6QWICF9SNtMXta4oNNi5IL/+AwdM20O9Yx4KTjeGjPs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Oz7GIA73Mom5tCaB682s6aU1fn1ExwkuyBlwsaFyiYlVSDAVZIN57hqoHmcwhvLYB uPTXQ/xkiGeSkWRv4Rq0wqRBieaAyP9CGOLcb1vvEgo38rQN3t+7wEwMxBLiqug2+I gjVK9MG9KnpH6iUZ6rRZj+mAYipZ/oQDS3Z3xut0= Date: Mon, 9 Nov 2020 17:53:06 +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: <20201109122306.GO3171@vkoul-mobl> References: <20200930091412.8020-1-peter.ujfalusi@ti.com> <20200930091412.8020-2-peter.ujfalusi@ti.com> <20201007054404.GR2968@vkoul-mobl> <20201007155533.GZ2968@vkoul-mobl> <45adb88b-1ef8-1fbf-08c1-9afc6ea4c6f0@ti.com> <20201028055531.GH3550@vkoul-mobl> <20201109114534.GH3171@vkoul-mobl> <7a7cb455-dd09-b71f-6ecc-fd6108d37051@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7a7cb455-dd09-b71f-6ecc-fd6108d37051@ti.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HI Peter, On 09-11-20, 14:09, Peter Ujfalusi wrote: > Hi Vinod, > > On 09/11/2020 13.45, Vinod Koul wrote: > >> Without a channel number I can not do anything. > >> It is close to a chicken and egg problem. > > > > We get 'channel' in xlate, so wont that help? I think I am still missing > > something here :( > > Yes, we get channel in xlate, but we get the channel after > ofdma->of_dma_route_allocate() That is correct, so you need this info in allocate somehow.. > of_dma_route_allocate() si the place where DMA routers create the > dmaspec for the DMA controller to get a channel and they up until BCDMA > did also the HW configuration to get the event routed. > > For a BCDMA channel we can have three triggers: > Global trigger 0 for the channel > Global trigger 1 for the channel > Local trigger for the channel > > Every BCDMA channel have these triggers and for all of them they are the > same (from the channel's pow). > bchan0 can be triggered by global trigger 0 > bchan1 can be triggered by global trigger 0 > > But these triggers are not the same ones, the real trigger depends on > the router, which of it's input is converted to send out an event to > trigger bchan0_trigger0 or to trigger bchan1_trigger0. > > When we got the channel with the dmaspec from the router driver then we > need to tell the router driver that it needs to send a given event in > order to trigger the channel that we got. > > We can not have traditional binding for BCDMA either where we would tell > the bchan index to be used because depending on the resource allocation > done within sysfw that exact channel might not be even available for us. > > - P?ter > > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. > Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki -- ~Vinod