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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Subject: Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver Date: Wed, 2 Aug 2017 17:09:37 +0300 Message-ID: <47ceba83-1097-072e-bed6-d1964bce7a25@ti.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; Format="flowed" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <7bcad698-fa1a-3dc2-e918-4400639ca6d7@st.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Pierre Yves MORDRET , Vinod Koul Cc: Mark Rutland , "devicetree@vger.kernel.org" , Amelie DELAUNAY , Alexandre TORGUE , Russell King , Fabien DESSENNE , "linux-kernel@vger.kernel.org" , "dmaengine@vger.kernel.org" , Rob Herring , Maxime Coquelin , M'boumba Cedric Madianga , Dan Williams , Fabrice GASNIER , "linux-arm-kernel@lists.infradead.org" , Herbert Xu List-Id: devicetree@vger.kernel.org 77u/ClRleGFzIEluc3RydW1lbnRzIEZpbmxhbmQgT3ksIFBvcmtrYWxhbmthdHUgMjIsIDAwMTgw IEhlbHNpbmtpLiBZLXR1bm51cy9CdXNpbmVzcyBJRDogMDYxNTUyMS00LiBLb3RpcGFpa2thL0Rv bWljaWxlOiBIZWxzaW5raQoKT24gMjAxNy0wOC0wMiAxNjoxMSwgUGllcnJlIFl2ZXMgTU9SRFJF VCB3cm90ZToKPiBPdXIgU29DIHdvcmtzIHdpdGggb3Igd2l0aG91dCBETUFNVVguIEJvdGggYmlu ZGluZyBpcyBhbGxvd2VkLiBVc2luZyBvbmx5IERNQSBhCj4gQ2hhbm5lbElkIGFuZCByZXF1ZXN0 IGxpbmUgaXMgcGFydCBvZiB0aGUgYmluZGluZy4KCkluIG91ciBjYXNlIHRoZSBhbTMzNXgncyBl RE1BIGNhbiB3b3JrIHdpdGggb3Igd2l0aG91dCB0aGUgcm91dGVyLCB3ZSAKb25seSB1c2UgdGhl IHJvdXRlciBub2RlIGlmIHdlIG5lZWQgbm9uZSBkZWZhdWx0IGV2ZW50IGZvciBhIGdpdmVuIERN QSAKcmVxdWVzdCBsaW5lLgoKPiBVc2luZyBETUFNVXggbm93IHRoZSByZXF1ZXN0Cj4gbGluZSBp cyBjb21pbmcgZnJvbSBkbWFf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NyZWF0ZSBhIGZvdXIgCnBhcmFtZXRlciBkbWFfc3BlYywgd2hlcmUgdGhlIENoYW5u ZWxJRCBpcyBkeW5hbWljYWxseSBhbGxvY2F0ZWQuCkJ1dCB5b3UgbmVlZCB0byBjb252ZXJ0IGFs bCBwZXJpcGhlcmFscyB0byB1c2UgdGhlIHJvdXRlcidzIG5vZGUgZm9yIHRoZSAKRE1BLgoKLSBQ w6l0ZXIKCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwps aW51eC1hcm0ta2VybmVsIG1haWxpbmcgbGlzdApsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJh ZGVhZC5vcmcKaHR0cDovL2xpc3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51 eC1hcm0ta2VybmVsCg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: peter.ujfalusi@ti.com (Peter Ujfalusi) Date: Wed, 2 Aug 2017 17:09:37 +0300 Subject: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver In-Reply-To: <7bcad698-fa1a-3dc2-e918-4400639ca6d7@st.com> 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> Message-ID: <47ceba83-1097-072e-bed6-d1964bce7a25@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org ? 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