提交 ca4c72c0 编写于 作者: P Pierre-Yves MORDRET 提交者: Vinod Koul

dmaengine: stm32-dma: check FIFO error interrupt enable

For avoiding false FIFO detection, check FIFO Error interrupt is
enabled prior raising any errors.
This will prevent having spurious FIFO error where it shouldn't.
Signed-off-by: NPierre-Yves MORDRET <pierre-yves.mordret@st.com>
Signed-off-by: NVinod Koul <vkoul@kernel.org>
上级 906b40b2
...@@ -641,12 +641,13 @@ static irqreturn_t stm32_dma_chan_irq(int irq, void *devid) ...@@ -641,12 +641,13 @@ static irqreturn_t stm32_dma_chan_irq(int irq, void *devid)
{ {
struct stm32_dma_chan *chan = devid; struct stm32_dma_chan *chan = devid;
struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan); struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
u32 status, scr; u32 status, scr, sfcr;
spin_lock(&chan->vchan.lock); spin_lock(&chan->vchan.lock);
status = stm32_dma_irq_status(chan); status = stm32_dma_irq_status(chan);
scr = stm32_dma_read(dmadev, STM32_DMA_SCR(chan->id)); scr = stm32_dma_read(dmadev, STM32_DMA_SCR(chan->id));
sfcr = stm32_dma_read(dmadev, STM32_DMA_SFCR(chan->id));
if (status & STM32_DMA_TCI) { if (status & STM32_DMA_TCI) {
stm32_dma_irq_clear(chan, STM32_DMA_TCI); stm32_dma_irq_clear(chan, STM32_DMA_TCI);
...@@ -661,10 +662,12 @@ static irqreturn_t stm32_dma_chan_irq(int irq, void *devid) ...@@ -661,10 +662,12 @@ static irqreturn_t stm32_dma_chan_irq(int irq, void *devid)
if (status & STM32_DMA_FEI) { if (status & STM32_DMA_FEI) {
stm32_dma_irq_clear(chan, STM32_DMA_FEI); stm32_dma_irq_clear(chan, STM32_DMA_FEI);
status &= ~STM32_DMA_FEI; status &= ~STM32_DMA_FEI;
if (!(scr & STM32_DMA_SCR_EN)) if (sfcr & STM32_DMA_SFCR_FEIE) {
dev_err(chan2dev(chan), "FIFO Error\n"); if (!(scr & STM32_DMA_SCR_EN))
else dev_err(chan2dev(chan), "FIFO Error\n");
dev_dbg(chan2dev(chan), "FIFO over/underrun\n"); else
dev_dbg(chan2dev(chan), "FIFO over/underrun\n");
}
} }
if (status) { if (status) {
stm32_dma_irq_clear(chan, status); stm32_dma_irq_clear(chan, status);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册