]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 6440/1: ep93xx: DMA: fix channel_disable
authorMika Westerberg <mika.westerberg@iki.fi>
Tue, 12 Oct 2010 09:37:59 +0000 (10:37 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 12 Oct 2010 21:43:19 +0000 (22:43 +0100)
commitea78788c9992946bbc2887e5e4e61eb5f1a1c154
tree60b4ae5c63da00a885130313315b49d3a5f9db7c
parent16dcf7fb72ec01207fedfef383f9f864b37cfbd1
ARM: 6440/1: ep93xx: DMA: fix channel_disable

When channel_disable() is called, it disables per channel interrupts and
waits until channels state becomes STATE_STALL, and then disables the
channel. Now, if the DMA transfer is disabled while the channel is in
STATE_NEXT we will not wait anything and disable the channel immediately.
This seems to cause weird data corruption for example in audio transfers.

Fix is to wait while we are in STATE_NEXT or STATE_ON and only then
disable the channel.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ep93xx/dma-m2p.c