From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751161AbdHBEw1 (ORCPT ); Wed, 2 Aug 2017 00:52:27 -0400 Received: from mga11.intel.com ([192.55.52.93]:15177 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbdHBEwZ (ORCPT ); Wed, 2 Aug 2017 00:52:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,309,1498546800"; d="scan'208";a="294508477" Date: Wed, 2 Aug 2017 10:25:22 +0530 From: Vinod Koul To: Pierre Yves MORDRET Cc: Peter Ujfalusi , 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" Subject: Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver Message-ID: <20170802045522.GU3053@localhost> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 01, 2017 at 09:32:50AM +0000, Pierre Yves MORDRET wrote: > > > On 07/31/2017 02:31 PM, Vinod Koul wrote: > > On Wed, Jul 26, 2017 at 07:38:02AM +0000, Pierre Yves MORDRET wrote: > >>>>>> + > >>>>>> +#ifndef __DMA_STM32_DMAMUX_H > >>>>>> +#define __DMA_STM32_DMAMUX_H > >>>>>> + > >>>>>> +#if defined(CONFIG_STM32_DMAMUX) > >>>>>> +int stm32_dmamux_set_config(struct device *dev, void *route_data, u32 chan_id); > >>>>> > >>>>> Why do we need a custom API in this case? > >>>>> > >>>> > >>>> This API is called by DMA when a slave is requested by client. DMA can work > >>>> without DMAMUX this API has been put in place to configure DMAMUX whether client > >>>> is requesting a DMAMUX Channel instead of a DMA one. > >>> > >>> You mean the dmaengine driver right? > >>> > >> > >> Yes. The API is mainly called by "device_config" through out STM32 DMA Driver > >> when a router is in place for client. > >> Please refer to Patch 4/5 on this set. > > > > Okay am thinking on why this can't be generic..? An optional router config > > callback? > > > > I would have liked to answer there is a callback within engine but unfortunately > I didn't figure out one when I did my router's development. I've looked once > more but again I can't find how to map chanID and request line without custom API. Yes there is no callback for routers but we can add a generic callback here to be used. I added Peter for his comments, isn't that something they need too? -- ~Vinod From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vinod Koul Subject: Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver Date: Wed, 2 Aug 2017 10:25:22 +0530 Message-ID: <20170802045522.GU3053@localhost> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Pierre Yves MORDRET Cc: Peter Ujfalusi , 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" List-Id: devicetree@vger.kernel.org On Tue, Aug 01, 2017 at 09:32:50AM +0000, Pierre Yves MORDRET wrote: > > > On 07/31/2017 02:31 PM, Vinod Koul wrote: > > On Wed, Jul 26, 2017 at 07:38:02AM +0000, Pierre Yves MORDRET wrote: > >>>>>> + > >>>>>> +#ifndef __DMA_STM32_DMAMUX_H > >>>>>> +#define __DMA_STM32_DMAMUX_H > >>>>>> + > >>>>>> +#if defined(CONFIG_STM32_DMAMUX) > >>>>>> +int stm32_dmamux_set_config(struct device *dev, void *route_data, u32 chan_id); > >>>>> > >>>>> Why do we need a custom API in this case? > >>>>> > >>>> > >>>> This API is called by DMA when a slave is requested by client. DMA can work > >>>> without DMAMUX this API has been put in place to configure DMAMUX whether client > >>>> is requesting a DMAMUX Channel instead of a DMA one. > >>> > >>> You mean the dmaengine driver right? > >>> > >> > >> Yes. The API is mainly called by "device_config" through out STM32 DMA Driver > >> when a router is in place for client. > >> Please refer to Patch 4/5 on this set. > > > > Okay am thinking on why this can't be generic..? An optional router config > > callback? > > > > I would have liked to answer there is a callback within engine but unfortunately > I didn't figure out one when I did my router's development. I've looked once > more but again I can't find how to map chanID and request line without custom API. Yes there is no callback for routers but we can add a generic callback here to be used. I added Peter for his comments, isn't that something they need too? -- ~Vinod From mboxrd@z Thu Jan 1 00:00:00 1970 From: vinod.koul@intel.com (Vinod Koul) Date: Wed, 2 Aug 2017 10:25:22 +0530 Subject: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver In-Reply-To: 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> Message-ID: <20170802045522.GU3053@localhost> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Aug 01, 2017 at 09:32:50AM +0000, Pierre Yves MORDRET wrote: > > > On 07/31/2017 02:31 PM, Vinod Koul wrote: > > On Wed, Jul 26, 2017 at 07:38:02AM +0000, Pierre Yves MORDRET wrote: > >>>>>> + > >>>>>> +#ifndef __DMA_STM32_DMAMUX_H > >>>>>> +#define __DMA_STM32_DMAMUX_H > >>>>>> + > >>>>>> +#if defined(CONFIG_STM32_DMAMUX) > >>>>>> +int stm32_dmamux_set_config(struct device *dev, void *route_data, u32 chan_id); > >>>>> > >>>>> Why do we need a custom API in this case? > >>>>> > >>>> > >>>> This API is called by DMA when a slave is requested by client. DMA can work > >>>> without DMAMUX this API has been put in place to configure DMAMUX whether client > >>>> is requesting a DMAMUX Channel instead of a DMA one. > >>> > >>> You mean the dmaengine driver right? > >>> > >> > >> Yes. The API is mainly called by "device_config" through out STM32 DMA Driver > >> when a router is in place for client. > >> Please refer to Patch 4/5 on this set. > > > > Okay am thinking on why this can't be generic..? An optional router config > > callback? > > > > I would have liked to answer there is a callback within engine but unfortunately > I didn't figure out one when I did my router's development. I've looked once > more but again I can't find how to map chanID and request line without custom API. Yes there is no callback for routers but we can add a generic callback here to be used. I added Peter for his comments, isn't that something they need too? -- ~Vinod