From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752581AbdHBOKX (ORCPT ); Wed, 2 Aug 2017 10:10:23 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:25075 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089AbdHBOKV (ORCPT ); Wed, 2 Aug 2017 10:10:21 -0400 Subject: Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver To: Pierre Yves MORDRET , Vinod Koul References: <1499343623-5964-1-git-send-email-pierre-yves.mordret@st.com> <1499343623-5964-3-git-send-email-pierre-yves.mordret@st.com> <20170722065133.GT3053@localhost> <2b916330-9b65-f4d5-817f-79b66cc236b3@st.com> <20170726052930.GF3053@localhost> <20170731123157.GJ3053@localhost> <20170802045522.GU3053@localhost> <7d2091fe-a2e5-78bb-b63d-9cb66bdb7e84@ti.com> <7bcad698-fa1a-3dc2-e918-4400639ca6d7@st.com> CC: Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre TORGUE , Russell King , Dan Williams , "M'boumba Cedric Madianga" , Fabrice GASNIER , Herbert Xu , Fabien DESSENNE , Amelie DELAUNAY , "dmaengine@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" From: Peter Ujfalusi Message-ID: <47ceba83-1097-072e-bed6-d1964bce7a25@ti.com> Date: Wed, 2 Aug 2017 17:09:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <7bcad698-fa1a-3dc2-e918-4400639ca6d7@st.com> Content-Type: text/plain; charset="utf-8"; format=flowed X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v72EARZ3026134  Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki On 2017-08-02 16:11, Pierre Yves MORDRET wrote: > Our SoC works with or without DMAMUX. Both binding is allowed. Using only DMA a > ChannelId and request line is part of the binding. In our case the am335x's eDMA can work with or without the router, we only use the router node if we need none default event for a given DMA request line. > Using DMAMUx now the request > line is coming from dma_spec forwards to dma-master as well explained by Peter. > However ChannelID is now given by dma_get_any_slave_channel instead of bindings. > DMAMUX driver has to be aware of this ID to route request line to out DMA > channel. This channel id information is carried on until DMAMUX through > dmaengine_slave_config with a custom API. > Hope it clarifies the need. I see, this is not much different then what we face with our dra7 devices. In theory we could use direct DMA binding to the DMA controller itself, but some requests would not be reachable, so we always use the router's node for DMA on dra7 family. Basically the router would manage the ChannelID and create 'st,stm32-dma' compatible dma_spec (the four parameters). Afaik you could have 3 parameters for the router and create a four parameter dma_spec, where the ChannelID is dynamically allocated. But you need to convert all peripherals to use the router's node for the DMA. - Péter