[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170501061230.GP6263@localhost>
Date: Mon, 1 May 2017 11:42:30 +0530
From: Vinod Koul <vinod.koul@...el.com>
To: Pierre Yves MORDRET <pierre-yves.mordret@...com>
Cc: M'boumba Cedric Madianga <cedric.madianga@...il.com>,
"mark.rutland@....com" <mark.rutland@....com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Alexandre TORGUE <alexandre.torgue@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"mcoquelin.stm32@...il.com" <mcoquelin.stm32@...il.com>,
"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 2/2] dmaengine: Add STM32 MDMA driver
On Wed, Apr 26, 2017 at 12:35:46PM +0000, Pierre Yves MORDRET wrote:
> On 04/06/2017 09:08 AM, Vinod Koul wrote:
> >> +static int stm32_mdma_get_width(struct stm32_mdma_chan *chan,
> >> + enum dma_slave_buswidth width)
> >> +{
> >> + switch (width) {
> >> + case DMA_SLAVE_BUSWIDTH_1_BYTE:
> >> + return STM32_MDMA_BYTE;
> >> + case DMA_SLAVE_BUSWIDTH_2_BYTES:
> >> + return STM32_MDMA_HALF_WORD;
> >> + case DMA_SLAVE_BUSWIDTH_4_BYTES:
> >> + return STM32_MDMA_WORD;
> >> + case DMA_SLAVE_BUSWIDTH_8_BYTES:
> >> + return STM32_MDMA_DOUBLE_WORD;
> >
> > IIUC we can do this with ffs()
>
> I don't believe we can do that. This function translates DMA_SLAVE enum
> into internal register representation.
Yes and internal represenation seemed to be ffs() of dmanegine one.
> >> +subsys_initcall(stm32_mdma_init);
> >
> > why subsys?
> >
>
> subsys_initcall level is to ensure MDMA is going to be probed before its
> clients
Please use deffered probe approach for that
--
~Vinod
Powered by blists - more mailing lists