dma: mmp_pdma: don't clear DCMD_ENDIRQEN at end of pending chain

In order to fully support multiple transactions per channel, we need to
assure we get an interrupt for each completed transaction. That flags
bit is also our only way to tell at which descriptor a transaction ends.

So, remove the manual clearing of that bit, and then inline the only
remaining command that is left in append_pending_queue() for better
readability.

Signed-off-by: Daniel Mack <zonque@gmail.com>
dma: mmp_pdma: add support for cyclic DMA descriptors

Provide a callback to prepare cyclic DMA transfers.
This is for instance needed for audio channel transport.

Signed-off-by: Daniel Mack <zonque@gmail.com>
dma: mmp_pdma: add support for residue reporting

In order to report the channel's residue, we walk the list of running
descriptors, look for those which match the cookie, and then try to find
the descriptor which defines upper and lower boundaries that embrace the
current transport pointer.

Signed-off-by: Daniel Mack <zonque@gmail.com>
dma: mmp_pdma: set DMA_PRIVATE

As the driver now has its own xlate function and makes use of the
dma_get_slave_channel(), we need to manually set the DMA_PRIVATE flags.

Drivers which rely on of_dma_simple_xlate() do implicitly the same by
going through __dma_request_channel().

Signed-off-by: Daniel Mack <zonque@gmail.com>
dma: mmp_pdma: implement DMA_PAUSE and DMA_RESUME

This is needed at least for audio operation.

Signed-off-by: Daniel Mack <zonque@gmail.com>
mtd: pxa3xx-nand: replace pxa_request_dma with dmaengine

[zonque@gmail.com: rebased in top of l2-mtd.git. The newly introduced
ARCH_HAS_DMA hack was changed into a check for CONFIG_HAS_DMA]

Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Signed-off-by: Daniel Mack <zonque@gmail.com>
mtd: pxa3xx-nand: use mmp_pdma_filter_fn and dma_request_slave_channel_compat

Signed-off-by: Daniel Mack <zonque@gmail.com>
ARM: pxa: ssp: remove unnecessary warning on kzalloc() failure

The memory subsystem will already complain loudly enough in such cases.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ARM: pxa: ssp: add shortcut for &pdev->dev

No functional change, just a cosmetic cleanup.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ARM: pxa: ssp: add DT bindings

This patch contains an ugly hack for looking up the the DMA request
number. The problem here is that the implementation as it stands will
allocate the DMA channel from the user of the ssp port, and hence we
cannot allocate a real channel here.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ARM: pxa: ssp: use devm_ functions

Use devm_ functions to allocate memory, ioremap, clk_get etc to clean up
the error unwind path.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ARM: pxa: ssp: add pxa_ssp_request_of()

Add a function to lookup ssp devices from device tree. This way, users
can reference the ssp devices in order to register to them.

Signed-off-by: Daniel Mack <zonque@gmail.com>
tty: serial: pxa: remove old cruft

This #if-0'd block wouldn't compile, so let's dispose it.

Signed-off-by: Daniel Mack <zonque@gmail.com>
spi: spi-pxa2xx: remove legacy PXA DMA bits

Generic DMA support was already implemented by commit cd7bed00
("spi/pxa2xx: break out the private DMA API usage into a separate
file") which moved all the legacy PXA DMA implementation code into
its own file.

With generic DMA available for PXA, we can now just trash this
file.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Mark Brown <broonie@linaro.org>
mmc: host: pxamci: switch over to dmaengine use

Successfully testes on a PXA3xx board.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ata: pdata_pxa: migrate over to dmaengine usage

This patch is compile-tested only, but the migration was actually
straight-forward.

Signed-off-by: Daniel Mack <zonque@gmail.com>
net: irda: pxaficp_ir: switch to dmaengine

This was only compile-tested.

Signed-off-by: Daniel Mack <zonque@gmail.com>
net: smc91x.c: switch to generic buf-to-buf DMA offload

Drop all PXA-DMA specific implementation details and rely on
dma_async_memcpy_buf_to_buf().

This patch is only compile-tested.

Signed-off-by: Daniel Mack <zonque@gmail.com>
net: smc911x.c: switch to dmaengine API

Drop all PXA-DMA specific implementation details and switch over to
generic dmaengine usage.

This patch is only compile-tested.

Signed-off-by: Daniel Mack <zonque@gmail.com>
ALSA: move dmaengine implementation from ASoC to ALSA core

For the PXA DMA rework, we need the generic dmaengine implementation
that currently lives in sound/soc for standalone (non-ASoC) AC'97
support.

Move it to sound/core, and rename the Kconfig symbol.

Signed-off-by: Daniel Mack <zonque@gmail.com>