Re: [PATCH V2] dma: mmp_tdma: disable irq when disabling dma channel

2013-06-21 Thread Vinod Koul
On Sat, Jun 15, 2013 at 12:51:48PM +0800, Qiao Zhou wrote:
> mask dma irq when disabling dma channel, so that interrupt status
> will not be set and interrupt won't come again.
> 
> Signed-off-by: Qiao Zhou 
Applied, thanks

--
~Vinod
> ---
>  drivers/dma/mmp_tdma.c |4 
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
> index 43d5a6c..9b93665 100644
> --- a/drivers/dma/mmp_tdma.c
> +++ b/drivers/dma/mmp_tdma.c
> @@ -154,6 +154,10 @@ static void mmp_tdma_disable_chan(struct mmp_tdma_chan 
> *tdmac)
>  {
>   writel(readl(tdmac->reg_base + TDCR) & ~TDCR_CHANEN,
>   tdmac->reg_base + TDCR);
> +
> + /* disable irq */
> + writel(0, tdmac->reg_base + TDIMR);
> +
>   tdmac->status = DMA_SUCCESS;
>  }
>  
> -- 
> 1.7.0.4
> 

-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2] dma: mmp_tdma: disable irq when disabling dma channel

2013-06-21 Thread Vinod Koul
On Sat, Jun 15, 2013 at 12:51:48PM +0800, Qiao Zhou wrote:
 mask dma irq when disabling dma channel, so that interrupt status
 will not be set and interrupt won't come again.
 
 Signed-off-by: Qiao Zhou zhouq...@marvell.com
Applied, thanks

--
~Vinod
 ---
  drivers/dma/mmp_tdma.c |4 
  1 files changed, 4 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
 index 43d5a6c..9b93665 100644
 --- a/drivers/dma/mmp_tdma.c
 +++ b/drivers/dma/mmp_tdma.c
 @@ -154,6 +154,10 @@ static void mmp_tdma_disable_chan(struct mmp_tdma_chan 
 *tdmac)
  {
   writel(readl(tdmac-reg_base + TDCR)  ~TDCR_CHANEN,
   tdmac-reg_base + TDCR);
 +
 + /* disable irq */
 + writel(0, tdmac-reg_base + TDIMR);
 +
   tdmac-status = DMA_SUCCESS;
  }
  
 -- 
 1.7.0.4
 

-- 
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2] dma: mmp_tdma: disable irq when disabling dma channel

2013-06-15 Thread zhangfei gao
On Sat, Jun 15, 2013 at 12:51 PM, Qiao Zhou  wrote:
> mask dma irq when disabling dma channel, so that interrupt status
> will not be set and interrupt won't come again.
>
> Signed-off-by: Qiao Zhou 

Acked-by: Zhangfei Gao 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2] dma: mmp_tdma: disable irq when disabling dma channel

2013-06-15 Thread zhangfei gao
On Sat, Jun 15, 2013 at 12:51 PM, Qiao Zhou zhouq...@marvell.com wrote:
 mask dma irq when disabling dma channel, so that interrupt status
 will not be set and interrupt won't come again.

 Signed-off-by: Qiao Zhou zhouq...@marvell.com

Acked-by: Zhangfei Gao zhangfei@gmail.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2] dma: mmp_tdma: disable irq when disabling dma channel

2013-06-14 Thread Qiao Zhou
mask dma irq when disabling dma channel, so that interrupt status
will not be set and interrupt won't come again.

Signed-off-by: Qiao Zhou 
---
 drivers/dma/mmp_tdma.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 43d5a6c..9b93665 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -154,6 +154,10 @@ static void mmp_tdma_disable_chan(struct mmp_tdma_chan 
*tdmac)
 {
writel(readl(tdmac->reg_base + TDCR) & ~TDCR_CHANEN,
tdmac->reg_base + TDCR);
+
+   /* disable irq */
+   writel(0, tdmac->reg_base + TDIMR);
+
tdmac->status = DMA_SUCCESS;
 }
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2] dma: mmp_tdma: disable irq when disabling dma channel

2013-06-14 Thread Qiao Zhou
V2 -> V1:
1, mask dma interrupt when disable DMA channel.
2, remove patch v1.

if the dma channel is disabled without interrupt masked, the interrupt
status may still be set. next time when dma channel is enabled again,
the old interrupt status may trigger the interrupt wrongly. we need to
mask the interrupt when dma channel is disabled.

Qiao Zhou (1):
  dma: mmp_tdma: disable irq when disabling dma channel

 drivers/dma/mmp_tdma.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2] dma: mmp_tdma: disable irq when disabling dma channel

2013-06-14 Thread Qiao Zhou
V2 - V1:
1, mask dma interrupt when disable DMA channel.
2, remove patch v1.

if the dma channel is disabled without interrupt masked, the interrupt
status may still be set. next time when dma channel is enabled again,
the old interrupt status may trigger the interrupt wrongly. we need to
mask the interrupt when dma channel is disabled.

Qiao Zhou (1):
  dma: mmp_tdma: disable irq when disabling dma channel

 drivers/dma/mmp_tdma.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2] dma: mmp_tdma: disable irq when disabling dma channel

2013-06-14 Thread Qiao Zhou
mask dma irq when disabling dma channel, so that interrupt status
will not be set and interrupt won't come again.

Signed-off-by: Qiao Zhou zhouq...@marvell.com
---
 drivers/dma/mmp_tdma.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 43d5a6c..9b93665 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -154,6 +154,10 @@ static void mmp_tdma_disable_chan(struct mmp_tdma_chan 
*tdmac)
 {
writel(readl(tdmac-reg_base + TDCR)  ~TDCR_CHANEN,
tdmac-reg_base + TDCR);
+
+   /* disable irq */
+   writel(0, tdmac-reg_base + TDIMR);
+
tdmac-status = DMA_SUCCESS;
 }
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/