From: ryan@bluewatersys.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] ARM: ep93xx: DMA: fix channel_disable
Date: Mon, 11 Oct 2010 08:34:29 +1300 [thread overview]
Message-ID: <4CB21545.7040301@bluewatersys.com> (raw)
In-Reply-To: <43bf7ec49ce8ee7e7c7c375be053d6095ba53511.1286707213.git.mika.westerberg@iki.fi>
On 10/10/2010 11:54 PM, Mika Westerberg wrote:
> 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>
> ---
> 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);
Looks correct to me. CC'ed Lennert, who originally wrote the DMA M2P
support, but otherwise:
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
--
Bluewater Systems Ltd - ARM Technology Solution Centre
Ryan Mallon 5 Amuri Park, 404 Barbadoes St
ryan at bluewatersys.com PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com New Zealand
Phone: +64 3 3779127 Freecall: Australia 1800 148 751
Fax: +64 3 3779135 USA 1800 261 2934
next prev parent reply other threads:[~2010-10-10 19:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-10 10:54 [PATCH 0/4] ASoC AC97 audio support for ep93xx Mika Westerberg
2010-10-10 10:54 ` [PATCH 1/4] ARM: ep93xx: DMA: fix channel_disable Mika Westerberg
2010-10-10 19:34 ` Ryan Mallon [this message]
2010-10-10 10:54 ` [PATCH 2/4] ASoC: add ep93xx AC97 audio driver Mika Westerberg
2010-10-11 9:47 ` Mark Brown
2010-10-11 10:07 ` Mika Westerberg
2010-10-11 10:43 ` Mark Brown
2010-10-11 12:17 ` Mika Westerberg
2010-10-10 10:54 ` [PATCH 3/4] ARM: ep93xx: add AC97 platform support Mika Westerberg
2010-10-10 19:39 ` Ryan Mallon
2010-10-11 7:47 ` Mika Westerberg
2010-10-10 10:54 ` [PATCH 4/4] ASoC: ep93xx: add Simplemachines Sim.One AC97 audio support Mika Westerberg
2010-10-11 0:22 ` [alsa-devel] " Jassi Brar
2010-10-11 7:38 ` Mika Westerberg
2010-10-11 7:46 ` Jassi Brar
2010-10-10 17:02 ` [PATCH 0/4] ASoC AC97 audio support for ep93xx Mika Westerberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CB21545.7040301@bluewatersys.com \
--to=ryan@bluewatersys.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).