From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH 1/5] dmaengine: dw_dmac: move to generic DMA binding Date: Tue, 29 Jan 2013 14:26:15 +0000 Message-ID: <20130129142615.GX23505@n2100.arm.linux.org.uk> References: <1359395857-1235-1-git-send-email-arnd@arndb.de> <201301291035.30265.arnd@arndb.de> <201301291331.48427.arnd@arndb.de> <1359467140.31148.41.camel@smile> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1359467140.31148.41.camel@smile> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Andy Shevchenko Cc: Vinod Koul , Viresh Kumar , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, spear-devel , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On Tue, Jan 29, 2013 at 03:45:40PM +0200, Andy Shevchenko wrote: > On Tue, 2013-01-29 at 13:31 +0000, Arnd Bergmann wrote: > > On Tuesday 29 January 2013, Viresh Kumar wrote: > > > You can still keep fargs as is and just fill them as: > > > > > > fargs.cfg_lo = 0; > > > > > > if (DMA_TO_DEV) > > > // dest is periph > > > fargs.cfg_hi = be32_to_cpup(dma_spec->args+0) << 11; > > > else if (DEV_TO_DMA) > > > // src is periph > > > fargs.cfg_hi = be32_to_cpup(dma_spec->args+0) << 7; > > > > > > The field size is 4 bits. > > > > Ah, good. So I guess the "dma-requests" property should actually > > be "16" then. > > > > Does this mean that an implicit zero request line means memory? > > No, it doesn't. > When dma is doing mem2mem transfers the request line field is ignored by > the hw. Memory to memory transfers are dealt with using a totally different API to the slave API. Look at the rest of the DMA engine API to see how it's used - any channel is selected with a DMA_MEMCPY capability. (IMHO, the MEM2MEM transfer type against the slave API should never have been permitted.)