diff options
author | Mika Westerberg <mika.westerberg@iki.fi> | 2010-10-12 10:37:59 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-12 22:43:19 +0100 |
commit | 10d48b3934940c178635413b5128c33bc17abe1d (patch) | |
tree | 60b4ae5c63da00a885130313315b49d3a5f9db7c | |
parent | c0bb5862a9076992e2cbeb5fa0d08c2ac3d4fbb0 (diff) | |
download | op-kernel-dev-10d48b3934940c178635413b5128c33bc17abe1d.zip op-kernel-dev-10d48b3934940c178635413b5128c33bc17abe1d.tar.gz |
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>
-rw-r--r-- | arch/arm/mach-ep93xx/dma-m2p.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-ep93xx/dma-m2p.c b/arch/arm/mach-ep93xx/dma-m2p.c index 8904ca4..a696d35 100644 --- a/arch/arm/mach-ep93xx/dma-m2p.c +++ b/arch/arm/mach-ep93xx/dma-m2p.c @@ -276,7 +276,7 @@ static void channel_disable(struct m2p_channel *ch) v &= ~(M2P_CONTROL_STALL_IRQ_EN | M2P_CONTROL_NFB_IRQ_EN); m2p_set_control(ch, v); - while (m2p_channel_state(ch) == STATE_ON) + while (m2p_channel_state(ch) >= STATE_ON) cpu_relax(); m2p_set_control(ch, 0x0); |