<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/dma/mxs-dma.c, branch next</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=next</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=next'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2013-11-13T10:08:31+00:00</updated>
<entry>
<title>dma: mxs-dma: Use semaphores for cyclic DMA</title>
<updated>2013-11-13T10:08:31+00:00</updated>
<author>
<name>Markus Pargmann</name>
<email>mpa@pengutronix.de</email>
</author>
<published>2013-10-29T07:47:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2dcbdce3610a1ba190a74b782b9f7f1f7f976325'/>
<id>urn:sha1:2dcbdce3610a1ba190a74b782b9f7f1f7f976325</id>
<content type='text'>
mxs dma channel hardware reset command is not reliable and can cause
a channel stall. The only way to fix the channel stall is a DMA engine
reset.

To avoid channel resets we use the hardware semaphore counter. For each
transmitted segment, the DMA channel will decrease the counter by one.
To use this mechanism with cyclic DMA, we need to increase the semaphore
counter with each completed DMA command in the interrupt handler. To
avoid any interruptions between the DMA transfers, the semaphore counter
is initialized with 2. This way the counter can be increased in the
interrupt handler without an influence on the transfer of the DMA
engine.

When disabling the channel, we stop increasing the semaphore counter in
the interrupt handler.

This patch was tested on i.MX28 with the SAIF DMA channel.

Signed-off-by: Markus Pargmann &lt;mpa@pengutronix.de&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dma: mxs-dma: Update state after channel reset</title>
<updated>2013-11-13T10:08:30+00:00</updated>
<author>
<name>Markus Pargmann</name>
<email>mpa@pengutronix.de</email>
</author>
<published>2013-10-29T07:47:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=bb3660f130996d2653f123ee1ad802f11adbfb1c'/>
<id>urn:sha1:bb3660f130996d2653f123ee1ad802f11adbfb1c</id>
<content type='text'>
After a channel reset, the channel stops running automatically. The
state update was missing so that a channel perperation right after a
channel reset failed.

Signed-off-by: Markus Pargmann &lt;mpa@pengutronix.de&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dma: mxs-dma: Fix channel reset hardware bug</title>
<updated>2013-11-13T10:08:30+00:00</updated>
<author>
<name>Markus Pargmann</name>
<email>mpa@pengutronix.de</email>
</author>
<published>2013-10-29T07:47:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=702e94d66b555622ca6830de3095b5f0bb2ff6d7'/>
<id>urn:sha1:702e94d66b555622ca6830de3095b5f0bb2ff6d7</id>
<content type='text'>
This is no official errata, but I noticed that the channel reset may
stop working if the DMA state engine is in the READ_FLUSH state.

This patch uses the channel debug1 register to wait for the DMA
statemachine to leave the READ_FLUSH state. After that we can continue
to reset the channel.

Tested on i.MX28.

Signed-off-by: Markus Pargmann &lt;mpa@pengutronix.de&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dma: mxs-dma: Report correct residue for cyclic DMA</title>
<updated>2013-11-13T10:08:30+00:00</updated>
<author>
<name>Markus Pargmann</name>
<email>mpa@pengutronix.de</email>
</author>
<published>2013-10-29T07:47:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7b11304a3c11a24a8674a47e8fd136182f86b49d'/>
<id>urn:sha1:7b11304a3c11a24a8674a47e8fd136182f86b49d</id>
<content type='text'>
Use the channel's buffer address register to calculate correct residue
value for tx_status.

Signed-off-by: Markus Pargmann &lt;mpa@pengutronix.de&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dma: mxs-dma: Cleanup interrupt handler</title>
<updated>2013-11-13T10:08:30+00:00</updated>
<author>
<name>Markus Pargmann</name>
<email>mpa@pengutronix.de</email>
</author>
<published>2013-10-29T07:47:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b2d639890b0d3379e844f6bb3c90d67ab292c80b'/>
<id>urn:sha1:b2d639890b0d3379e844f6bb3c90d67ab292c80b</id>
<content type='text'>
The DMA interrupt handler uses its controll registers to handle all
available channel interrupts it can find.

This patch changes it to handle only one interrupt by directly mapping
irq number to channel. It also includes a cleanup of the ctrl-register
usage.

Signed-off-by: Markus Pargmann &lt;mpa@pengutronix.de&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: mxs-dma: use DMA_COMPLETE for dma completion status</title>
<updated>2013-10-25T05:46:10+00:00</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2013-10-16T15:21:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2737583ea068b8e56f9d34b73a5860dc25227a73'/>
<id>urn:sha1:2737583ea068b8e56f9d34b73a5860dc25227a73</id>
<content type='text'>
Acked-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dma: mxs-dma: remove code left from generic DMA binding conversion</title>
<updated>2013-08-19T08:50:21+00:00</updated>
<author>
<name>Shawn Guo</name>
<email>shawn.guo@linaro.org</email>
</author>
<published>2013-07-16T09:28:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b1baec525e75bcf4dd8c8824cfde476a98b13bab'/>
<id>urn:sha1:b1baec525e75bcf4dd8c8824cfde476a98b13bab</id>
<content type='text'>
With all mxs-dma clients moved to use generic DMA helper, the code
left from generic DMA binding conversion can be removed now.

Signed-off-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>mxs-dma: remove useless variable</title>
<updated>2013-08-05T04:02:24+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2013-05-27T12:14:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=09d16690cb9b3f1d67b67f70c7bad136deefca72'/>
<id>urn:sha1:09d16690cb9b3f1d67b67f70c7bad136deefca72</id>
<content type='text'>
last_used variable is applied only once, so, let's substitute it by its value.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dma: mxs-dma: Staticize mxs_dma_xlate</title>
<updated>2013-07-05T06:10:33+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2013-05-24T19:37:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3208b3701b98dcd14f0d5f0a36dd33d21b0b458f'/>
<id>urn:sha1:3208b3701b98dcd14f0d5f0a36dd33d21b0b458f</id>
<content type='text'>
Fix the following sparse warning:

drivers/dma/mxs-dma.c:696:17: warning: symbol 'mxs_dma_xlate' was not declared. Should it be static?

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Acked-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dma: mxs-dma: move to generic device tree binding</title>
<updated>2013-04-04T13:22:43+00:00</updated>
<author>
<name>Shawn Guo</name>
<email>shawn.guo@linaro.org</email>
</author>
<published>2013-02-26T01:42:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d84f638b037fcd132ecf6f09f5b8ccf82278b9ee'/>
<id>urn:sha1:d84f638b037fcd132ecf6f09f5b8ccf82278b9ee</id>
<content type='text'>
Update mxs-dma driver to adopt generic DMA device tree binding.  It
calls of_dma_controller_register() with mxs specific of_dma_xlate to
get the generic DMA device tree helper support.  Then DMA clients only
need to call dma_request_slave_channel() for requesting a DMA channel
from dmaengine.

The existing way of requesting channel, clients directly call
dma_request_channel(), still work there, and will be removed after
all mxs-dma clients get converted to generic DMA device tree helper.

Signed-off-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
</feed>
