tdc: fix DMA error bug

We were comparing the wrong values.
Signed-off-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsalvez <siglesias@igalia.com>
parent 0b5e167a
......@@ -28,11 +28,11 @@
#define TDC_DMA_NEXT_H_R 0x1C
#define TDC_DMA_ATTRIB_R 0x20
#define TDC_DMA_STAT_IDLE BIT(0)
#define TDC_DMA_STAT_DONE BIT(1)
#define TDC_DMA_STAT_BUSY BIT(2)
#define TDC_DMA_STAT_ERR BIT(3)
#define TDC_DMA_STAT_ABORT BIT(4)
#define TDC_DMA_STAT_IDLE 0
#define TDC_DMA_STAT_DONE 1
#define TDC_DMA_STAT_BUSY 2
#define TDC_DMA_STAT_ERR 3
#define TDC_DMA_STAT_ABORT 4
/* ACAM GPX chip registers available */
#define TDC_ACAM_CFG_REG_0 0x20000
......
......@@ -155,7 +155,8 @@ static void tdc_fmc_irq_work(struct work_struct *work)
}
/* Check the status of the DMA */
if(readl(tdc->base + TDC_DMA_STAT_R) & (TDC_DMA_STAT_ERR | TDC_DMA_STAT_ABORT)) {
ret = readl(tdc->base + TDC_DMA_STAT_R);
if((ret == TDC_DMA_STAT_ERR) || (ret == TDC_DMA_STAT_ABORT)) {
pr_err("tdc: error in DMA transfer\n");
mutex_unlock(&fmc_dma_lock);
goto dma_out;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment