Skip to content

Commit 9f646ff

Browse files
Mrinmay Sarkarvinodkoul
authored andcommitted
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: e74c395 ("dmaengine: dw-edma: Add support for native HDMA") cc: [email protected] Signed-off-by: Mrinmay Sarkar <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Serge Semin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 383baf5 commit 9f646ff

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

drivers/dma/dw-edma/dw-hdma-v0-core.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ enum dw_hdma_control {
1717
DW_HDMA_V0_CB = BIT(0),
1818
DW_HDMA_V0_TCB = BIT(1),
1919
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),
2222
DW_HDMA_V0_CCS = BIT(8),
2323
DW_HDMA_V0_LLE = BIT(9),
2424
};
@@ -195,25 +195,14 @@ static void dw_hdma_v0_write_ll_link(struct dw_edma_chunk *chunk,
195195
static void dw_hdma_v0_core_write_chunk(struct dw_edma_chunk *chunk)
196196
{
197197
struct dw_edma_burst *child;
198-
struct dw_edma_chan *chan = chunk->chan;
199198
u32 control = 0, i = 0;
200-
int j;
201199

202200
if (chunk->cb)
203201
control = DW_HDMA_V0_CB;
204202

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)
214204
dw_hdma_v0_write_ll_data(chunk, i++, control, child->sz,
215205
child->sar, child->dar);
216-
}
217206

218207
control = DW_HDMA_V0_LLP | DW_HDMA_V0_TCB;
219208
if (!chunk->cb)

0 commit comments

Comments
 (0)