From: Tony Lindgren <tony@atomide.com>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: linux-omap@vger.kernel.org, Venkatraman S <svenkatr@ti.com>,
Hari n <hari.zoom@gmail.com>, Jarkko Nikula <jhnikula@gmail.com>
Subject: Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking
Date: Wed, 14 Oct 2009 10:06:26 -0700 [thread overview]
Message-ID: <20091014170625.GH12700@atomide.com> (raw)
In-Reply-To: <1255500862-29847-1-git-send-email-santosh.shilimkar@ti.com>
* Santosh Shilimkar <santosh.shilimkar@ti.com> [091013 23:14]:
> OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when used
> in linking scenario. This patch fixes the same.
To me it looks like this will break things for omap1 as the DMA channel
interrupt is not disabled first. I guess the fix is to move the
"Disable all interrupts on the channel" part above clearing the
link mappings.
This fix should be tested in linux-omap before we send this to mainline.
Tony
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Signed-off-by: Venkatraman S <svenkatr@ti.com>
> CC: Hari n <hari.zoom@gmail.com>
> CC: Jarkko Nikula <jhnikula@gmail.com>
> ---
> arch/arm/plat-omap/dma.c | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index fd3154a..633c123 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -975,6 +975,11 @@ void omap_stop_dma(int lch)
> {
> u32 l;
>
> + /* Disable the DMA channel */
> + l = dma_read(CCR(lch));
> + l &= ~OMAP_DMA_CCR_EN;
> + dma_write(l, CCR(lch));
> +
> if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
> int next_lch, cur_lch = lch;
> char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
> @@ -1000,10 +1005,6 @@ void omap_stop_dma(int lch)
> if (cpu_class_is_omap1())
> dma_write(0, CICR(lch));
>
> - l = dma_read(CCR(lch));
> - l &= ~OMAP_DMA_CCR_EN;
> - dma_write(l, CCR(lch));
> -
> dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
> }
> EXPORT_SYMBOL(omap_stop_dma);
> --
> 1.5.4.7
>
next prev parent reply other threads:[~2009-10-14 17:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 6:14 [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking Santosh Shilimkar
2009-10-14 6:14 ` [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 board Santosh Shilimkar
2009-10-14 6:14 ` [PATCH] ARM: OMAP4: Fix UART4 platform data Santosh Shilimkar
2009-10-19 17:28 ` [APPLIED] " Tony Lindgren
2009-10-19 17:25 ` [APPLIED] [PATCH] ARM: OMAP4: Allow omap_serial_early_init() for OMAP4430 Tony Lindgren
2009-10-14 17:06 ` Tony Lindgren [this message]
2009-10-15 4:40 ` [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking Shilimkar, Santosh
2009-10-15 18:40 ` Tony Lindgren
2009-10-16 5:07 ` Shilimkar, Santosh
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=20091014170625.GH12700@atomide.com \
--to=tony@atomide.com \
--cc=hari.zoom@gmail.com \
--cc=jhnikula@gmail.com \
--cc=linux-omap@vger.kernel.org \
--cc=santosh.shilimkar@ti.com \
--cc=svenkatr@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.