Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking

2009-10-15 Thread Tony Lindgren
* Shilimkar, Santosh santosh.shilim...@ti.com [091014 21:40]:
  -Original Message-
  From: Tony Lindgren [mailto:t...@atomide.com]
  Sent: Wednesday, October 14, 2009 10:36 PM
  To: Shilimkar, Santosh
  Cc: linux-omap@vger.kernel.org; S, Venkatraman; Hari n; Jarkko Nikula
  Subject: Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel
  linking
  
  * Santosh Shilimkar santosh.shilim...@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.
 Indeed it will break OMAP1. Initially I thought of putting this change at 
 this place so that it takes care of both normal and linking scenario. 
 
 I will rework this and send v2.

OK, thanks.
 
  This fix should be tested in linux-omap before we send this to mainline.
 Yes ofcourse. That what I meant by merge.

Yeah, we should still have enough time to get it into mainline kernel
as a fix during this -rc cycle.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking

2009-10-15 Thread Shilimkar, Santosh
snip 
   This fix should be tested in linux-omap before we send this to
 mainline.
  Yes ofcourse. That what I meant by merge.
 
 Yeah, we should still have enough time to get it into mainline kernel
 as a fix during this -rc cycle.

OK. Also please merge other two patches in linux-omap master since omap4 needs 
those two patches to boot.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking

2009-10-14 Thread Tony Lindgren
* Santosh Shilimkar santosh.shilim...@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.shilim...@ti.com
 Signed-off-by: Venkatraman S svenk...@ti.com
 CC: Hari n hari.z...@gmail.com
 CC: Jarkko Nikula jhnik...@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
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel linking

2009-10-14 Thread Shilimkar, Santosh
 -Original Message-
 From: Tony Lindgren [mailto:t...@atomide.com]
 Sent: Wednesday, October 14, 2009 10:36 PM
 To: Shilimkar, Santosh
 Cc: linux-omap@vger.kernel.org; S, Venkatraman; Hari n; Jarkko Nikula
 Subject: Re: [PATCH] ARM: OMAP: SDMA: Fix omap_stop_dma() API for channel
 linking
 
 * Santosh Shilimkar santosh.shilim...@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.
Indeed it will break OMAP1. Initially I thought of putting this change at this 
place so that it takes care of both normal and linking scenario. 

I will rework this and send v2.

 This fix should be tested in linux-omap before we send this to mainline.
Yes ofcourse. That what I meant by merge.

  Signed-off-by: Santosh Shilimkar santosh.shilim...@ti.com
  Signed-off-by: Venkatraman S svenk...@ti.com
  CC: Hari n hari.z...@gmail.com
  CC: Jarkko Nikula jhnik...@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
 
Regards,
Santosh
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html