[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130205123828.GB17852@n2100.arm.linux.org.uk>
Date: Tue, 5 Feb 2013 12:38:28 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Arnd Bergmann <arnd@...db.de>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Cyril Chemparathy <cyril@...com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>, balbi@...com,
Sergei Shtylyov <sshtylyov@...sta.com>,
Linux Documentation List <linux-doc@...r.kernel.org>,
Lindgren <tony@...mide.com>, Vinod Koul <vinod.koul@...el.com>,
"Nair, Sandeep" <sandeep_n@...com>, Chris Ball <cjb@...top.org>,
Matt Porter <mporter@...com>,
Devicetree Discuss <devicetree-discuss@...ts.ozlabs.org>,
Rob Herring <rob.herring@...xeda.com>,
Linux OMAP List <linux-omap@...r.kernel.org>,
ARM Kernel List <linux-arm-kernel@...ts.infradead.org>,
Linux DaVinci Kernel List
<davinci-linux-open-source@...ux.davincidsp.com>,
"Cousson, Benoit" <b-cousson@...com>,
Linux MMC List <linux-mmc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Landley <rob@...dley.net>, Dan Williams <djbw@...com>,
Linux SPI Devel List
<spi-devel-general@...ts.sourceforge.net>
Subject: Re: [PATCH v7 01/10] ARM: davinci: move private EDMA API to
arm/common
On Mon, Feb 04, 2013 at 09:47:38PM +0000, Arnd Bergmann wrote:
> On Monday 04 February 2013, Linus Walleij wrote:
> > So I think the above concerns are moot. The callback we can
> > set on cookies is entirely optional, and it's even implemented by
> > each DMA engine, and some may not even support it but require
> > polling, and then it won't even be implemented by the driver.
>
> Just to ensure that everybody is talking about the same thing here:
> Is it just the callback that is optional, or also the interrupt
> coming from the hardware?
If everyone implements stuff correctly, both. The callback most certainly
is optional as things stand. The interrupt - that depends on the DMA
engine.
Some DMA engines you can't avoid it because you need to reprogram the
hardware with the next+1 transfer upon completion of an existing transfer.
Others may allow you to chain transfers in hardware. That's all up to
how the DMA engine driver is implemented and how the hardware behaves.
Now, there's another problem here: that is, people abuse the API. People
don't pass DMA_CTRL_ACK | DMA_PREP_INTERRUPT into their operations by
default. People like typing '0'.
The intention of the "DMA_PREP_INTERRUPT" is significant here: it means
"ask the hardware to send an interrupt upon completion of this transfer".
Because soo many people like to type '0' instead in their DMA engine
clients, it means that this flag is utterly useless today - you have to
ignore it. So there's _no_ way for client drivers to actually tell the
a DMA engine driver which _doesn't_ need to signal interrupts at the end
of every transfer not to do so.
So yes, the DMA engine API supports it. Whether the _implementations_
themselves do is very much hit and miss (and in reality is much more
miss than hit.)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists