Commit 3fdabb7a authored by Federico Vaga's avatar Federico Vaga

sw:drv: delay DMA WRITE completion to overcome a bug

The HDL asserts the IRQ line before the end of a write to DDR transfer.
We can't fix the problem on HDL due to lack of resources, so we add a
5us (empirical tests) delay in software.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 32659261
......@@ -668,6 +668,15 @@ static irqreturn_t gn412x_dma_irq_handler(int irq, void *arg)
/* FIXME check for spurious - need HDL fix */
gn412x_dma_irq_ack(gn412x_dma);
if (unlikely(chan->sconfig.direction == DMA_MEM_TO_DEV)) {
/*
* There is a bug in the HDL core, write path.
* The IRQ line is asserted before the actual end of transfer.
* A delay of 5us is the best compromise (empirical tests)
*/
ndelay(5000);
}
spin_lock_irqsave(&chan->lock, flags);
tx = chan->tx_curr;
chan->tx_curr = NULL;
......
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