dmaengine: sa11x0-dma: fix DMA residue support
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 10 May 2012 22:45:24 +0000 (23:45 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 1 Jul 2012 13:16:25 +0000 (14:16 +0100)
commit63fe23c34e1c18725bd1459897bf3a46335d88b7
tree2b0b806dda260ccd075e1747834669022516434b
parent571fa74034701391b1be2ad193f684acfdeb75d1
dmaengine: sa11x0-dma: fix DMA residue support

The semantics now implemented are:

- If the cookie has completed successfully, the residue will be zero.
- If the cookie is in progress or the channel is paused, it will be the
  number of bytes yet to be transferred. [*]
- If the cookie is queued, it will be the number of bytes in the
  descriptor.

* - where this is the number of bytes yet to be transferred to/from
  RAM.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/dma/sa11x0-dma.c