esp: use ESP rather than DMA interrupt to detect end of transfer

Rather than rely on the DMA interrupt to determine that an ESP interrupt has
occurred, poll the ESP interrupt register directly. This enables us to poll
until one of the specified interrupts occurs.

Since an ESP interrupt can still be in a pending state before issuing an ESP
command, read the ESP interrupt register beforehand to clear any pending
interrupts.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
1 file changed