Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: dw-edma: Do not enable watermark interrupts for HDMA

DW_HDMA_V0_LIE and DW_HDMA_V0_RIE are initialized as BIT(3) and BIT(4)
respectively in dw_hdma_control enum. But as per HDMA register these
bits are corresponds to LWIE and RWIE bit i.e local watermark interrupt
enable and remote watermarek interrupt enable. In linked list mode LWIE
and RWIE bits only enable the local and remote watermark interrupt.

Since the watermark interrupts are not used but enabled, this leads to
spurious interrupts getting generated. So remove the code that enables
them to avoid generating spurious watermark interrupts.

And also rename DW_HDMA_V0_LIE to DW_HDMA_V0_LWIE and DW_HDMA_V0_RIE to
DW_HDMA_V0_RWIE as there is no LIE and RIE bits in HDMA and those bits
are corresponds to LWIE and RWIE bits.

Fixes: e74c39573d35 ("dmaengine: dw-edma: Add support for native HDMA")
cc: stable@vger.kernel.org
Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Link: https://lore.kernel.org/r/1724674261-3144-3-git-send-email-quic_msarkar@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Mrinmay Sarkar and committed by
Vinod Koul
9f646ff2 383baf5c

+3 -14
+3 -14
drivers/dma/dw-edma/dw-hdma-v0-core.c
··· 17 17 DW_HDMA_V0_CB = BIT(0), 18 18 DW_HDMA_V0_TCB = BIT(1), 19 19 DW_HDMA_V0_LLP = BIT(2), 20 - DW_HDMA_V0_LIE = BIT(3), 21 - DW_HDMA_V0_RIE = BIT(4), 20 + DW_HDMA_V0_LWIE = BIT(3), 21 + DW_HDMA_V0_RWIE = BIT(4), 22 22 DW_HDMA_V0_CCS = BIT(8), 23 23 DW_HDMA_V0_LLE = BIT(9), 24 24 }; ··· 195 195 static void dw_hdma_v0_core_write_chunk(struct dw_edma_chunk *chunk) 196 196 { 197 197 struct dw_edma_burst *child; 198 - struct dw_edma_chan *chan = chunk->chan; 199 198 u32 control = 0, i = 0; 200 - int j; 201 199 202 200 if (chunk->cb) 203 201 control = DW_HDMA_V0_CB; 204 202 205 - j = chunk->bursts_alloc; 206 - list_for_each_entry(child, &chunk->burst->list, list) { 207 - j--; 208 - if (!j) { 209 - control |= DW_HDMA_V0_LIE; 210 - if (!(chan->dw->chip->flags & DW_EDMA_CHIP_LOCAL)) 211 - control |= DW_HDMA_V0_RIE; 212 - } 213 - 203 + list_for_each_entry(child, &chunk->burst->list, list) 214 204 dw_hdma_v0_write_ll_data(chunk, i++, control, child->sz, 215 205 child->sar, child->dar); 216 - } 217 206 218 207 control = DW_HDMA_V0_LLP | DW_HDMA_V0_TCB; 219 208 if (!chunk->cb)