public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] omap: dma: Add read-back to DMA interrupt handler to avoid spurious interrupts
@ 2010-10-25 14:35 Mathias Nyman
  2010-10-26  5:31 ` Shilimkar, Santosh
  2010-11-05 16:51 ` Tony Lindgren
  0 siblings, 2 replies; 3+ messages in thread
From: Mathias Nyman @ 2010-10-25 14:35 UTC (permalink / raw)
  To: linux-omap; +Cc: Mathias Nyman

Flush the writes to IRQSTATUS_L0 register in the DMA interrupt handler by reading the register
directly after write. This prevents the spurious DMA interrupts noted when using VDD_OPP 1

Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com>
---
 arch/arm/plat-omap/dma.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index f5c5b8d..2c28265 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1983,6 +1983,8 @@ static int omap2_dma_handle_ch(int ch)
 
 	dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR(ch));
 	dma_write(1 << ch, IRQSTATUS_L0);
+	/* read back the register to flush the write */
+	dma_read(IRQSTATUS_L0);
 
 	/* If the ch is not chained then chain_id will be -1 */
 	if (dma_chan[ch].chain_id != -1) {
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] omap: dma: Add read-back to DMA interrupt handler to avoid spurious interrupts
  2010-10-25 14:35 [PATCH] omap: dma: Add read-back to DMA interrupt handler to avoid spurious interrupts Mathias Nyman
@ 2010-10-26  5:31 ` Shilimkar, Santosh
  2010-11-05 16:51 ` Tony Lindgren
  1 sibling, 0 replies; 3+ messages in thread
From: Shilimkar, Santosh @ 2010-10-26  5:31 UTC (permalink / raw)
  To: Mathias Nyman, linux-omap@vger.kernel.org

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Mathias Nyman
> Sent: Monday, October 25, 2010 8:05 PM
> To: linux-omap@vger.kernel.org
> Cc: Mathias Nyman
> Subject: [PATCH] omap: dma: Add read-back to DMA interrupt handler to
> avoid spurious interrupts
> 
> Flush the writes to IRQSTATUS_L0 register in the DMA interrupt handler by
> reading the register
> directly after write. This prevents the spurious DMA interrupts noted when
> using VDD_OPP 1
>
Good fix Mathias.
Actually we should also clear other status lines as well when
used with multiple master initiator scenario's. But that need some
additional fixes as well. 

> Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com>

Acked-by: Santosh Shilimkar <Santosh.shilimkar@ti.com>

> ---
>  arch/arm/plat-omap/dma.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index f5c5b8d..2c28265 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -1983,6 +1983,8 @@ static int omap2_dma_handle_ch(int ch)
> 
>  	dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR(ch));
>  	dma_write(1 << ch, IRQSTATUS_L0);
> +	/* read back the register to flush the write */
> +	dma_read(IRQSTATUS_L0);
> 
>  	/* If the ch is not chained then chain_id will be -1 */
>  	if (dma_chan[ch].chain_id != -1) {
> --
> 1.5.6.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] omap: dma: Add read-back to DMA interrupt handler to avoid spurious interrupts
  2010-10-25 14:35 [PATCH] omap: dma: Add read-back to DMA interrupt handler to avoid spurious interrupts Mathias Nyman
  2010-10-26  5:31 ` Shilimkar, Santosh
@ 2010-11-05 16:51 ` Tony Lindgren
  1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2010-11-05 16:51 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: linux-omap

* Mathias Nyman <mathias.nyman@nokia.com> [101025 07:22]:
> Flush the writes to IRQSTATUS_L0 register in the DMA interrupt handler by reading the register
> directly after write. This prevents the spurious DMA interrupts noted when using VDD_OPP 1

Adding this to omap-fixes. For future arch/arm/*omap*/ patches,
please always Cc also linux-arm-kernel list. That way I can
apply the patch without a need to repost.

Regards,

Tony
 
> Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com>
> ---
>  arch/arm/plat-omap/dma.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index f5c5b8d..2c28265 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -1983,6 +1983,8 @@ static int omap2_dma_handle_ch(int ch)
>  
>  	dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR(ch));
>  	dma_write(1 << ch, IRQSTATUS_L0);
> +	/* read back the register to flush the write */
> +	dma_read(IRQSTATUS_L0);
>  
>  	/* If the ch is not chained then chain_id will be -1 */
>  	if (dma_chan[ch].chain_id != -1) {
> -- 
> 1.5.6.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-05 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 14:35 [PATCH] omap: dma: Add read-back to DMA interrupt handler to avoid spurious interrupts Mathias Nyman
2010-10-26  5:31 ` Shilimkar, Santosh
2010-11-05 16:51 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox