aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/hsu/hsu.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2016-03-18 14:26:32 +0200
committerVinod Koul <vinod.koul@intel.com>2016-04-04 09:41:43 -0700
commit4f4bc0abff79dc9d7ccbd3143adbf8ad1f4fe6ab (patch)
treee3a2e86b00b408c281c6d1304228a5c4c9a6111b /drivers/dma/hsu/hsu.c
parentdmaengine: hsu: correct residue calculation of active descriptor (diff)
downloadlinux-dev-4f4bc0abff79dc9d7ccbd3143adbf8ad1f4fe6ab.tar.xz
linux-dev-4f4bc0abff79dc9d7ccbd3143adbf8ad1f4fe6ab.zip
dmaengine: hsu: correct use of channel status register
There is a typo in documentation regarding to descriptor empty bit (DESCE) which is set to 1 when descriptor is empty. Thus, status register at the end of a transfer usually returns all DESCE bits set and thus it will never be zero. Moreover, there are 2 bits (CDESC) that encode current descriptor, on which interrupt has been asserted. In case when we have few descriptors programmed we might have non-zero value. Remove DESCE and CDESC bits from DMA channel status register (HSU_CH_SR) when reading it. Fixes: 2b49e0c56741 ("dmaengine: append hsu DMA driver") Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/hsu/hsu.c')
-rw-r--r--drivers/dma/hsu/hsu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/hsu/hsu.c b/drivers/dma/hsu/hsu.c
index b3b212146620..ee510515ce18 100644
--- a/drivers/dma/hsu/hsu.c
+++ b/drivers/dma/hsu/hsu.c
@@ -135,7 +135,7 @@ static u32 hsu_dma_chan_get_sr(struct hsu_dma_chan *hsuc)
sr = hsu_chan_readl(hsuc, HSU_CH_SR);
spin_unlock_irqrestore(&hsuc->vchan.lock, flags);
- return sr;
+ return sr & ~(HSU_CH_SR_DESCE_ANY | HSU_CH_SR_CDESC_ANY);
}
irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr)