From: stanley.miao@windriver.com (stanley.miao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] davinci: edma: clear events in edma_start()
Date: Mon, 24 May 2010 19:59:30 +0800 [thread overview]
Message-ID: <4BFA6A22.1000006@windriver.com> (raw)
In-Reply-To: <1268841163-5868-4-git-send-email-khilman@deeprootsystems.com>
This patch causes that the sound can not work normally on OMAP_L138.
Stanley.
Kevin Hilman wrote:
> From: Brian Niebuhr <bniebuhr3@gmail.com>
>
> This patch fixes an issue where a DMA channel can erroneously process an
> event generated by a previous transfer. A failure case is where DMA is
> being used for SPI transmit and receive channels on OMAP L138. In this
> case there is a single bit that controls all event generation from the
> SPI peripheral. Therefore it is possible that between when edma_stop()
> has been called for the transmit channel on a previous transfer and
> edma_start() is called for the transmit channel on a subsequent transfer,
> that a transmit event has been generated.
>
> The fix is to clear events in edma_start(). This prevents false events
> from being processed when events are enabled for that channel.
>
> Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> ---
> arch/arm/mach-davinci/dma.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
> index 15dd886..260485c 100644
> --- a/arch/arm/mach-davinci/dma.c
> +++ b/arch/arm/mach-davinci/dma.c
> @@ -1266,7 +1266,8 @@ int edma_start(unsigned channel)
> /* EDMA channel with event association */
> pr_debug("EDMA: ER%d %08x\n", j,
> edma_shadow0_read_array(ctlr, SH_ER, j));
> - /* Clear any pending error */
> + /* Clear any pending event or error */
> + edma_write_array(ctlr, EDMA_ECR, j, mask);
> edma_write_array(ctlr, EDMA_EMCR, j, mask);
> /* Clear any SER */
> edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
>
next prev parent reply other threads:[~2010-05-24 11:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 15:52 [PATCH 0/6] davinci fixes for 2.6.34-rc Kevin Hilman
2010-03-17 15:52 ` [PATCH 1/6] davinci: timers: don't enable timer until clocksource is initialized Kevin Hilman
2010-03-17 15:52 ` [PATCH 2/6] davinci: da8xx/omap-l1: fix build error when CONFIG_DAVINCI_MUX is undefined Kevin Hilman
2010-03-17 15:52 ` [PATCH 3/6] davinci: edma: clear events in edma_start() Kevin Hilman
2010-05-24 11:59 ` stanley.miao [this message]
2010-05-24 17:27 ` Kevin Hilman
2010-05-25 10:05 ` stanley.miao
2010-05-25 13:28 ` Sudhakar Rajashekhara
2010-05-25 15:31 ` Kevin Hilman
2010-05-25 15:30 ` Kevin Hilman
2010-03-17 15:52 ` [PATCH 4/6] davinci: DM365: fix duplicate default IRQ priorities Kevin Hilman
2010-03-17 15:52 ` [PATCH 5/6] davinci: misc cleanups from sparse Kevin Hilman
2010-03-17 15:52 ` [PATCH 6/6] davinci: sparse: gpio: void casting Kevin Hilman
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=4BFA6A22.1000006@windriver.com \
--to=stanley.miao@windriver.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).