]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: nand: pxa3xx: Make dma code dependent on dma capable platforms
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Mon, 12 Aug 2013 17:14:56 +0000 (14:14 -0300)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 12 Aug 2013 22:13:43 +0000 (15:13 -0700)
commit555f221da8eef60234fbf5e9e2fcd4ec2a5c2eac
tree5c6ce14caf5063dd1c49d86b7d3ed1bae30da974
parent42c9e007c4639059f754678b77d995fb6a4fcf48
mtd: nand: pxa3xx: Make dma code dependent on dma capable platforms

This patch adds a macro ARCH_HAS_DMA to compile-out arch specific
dma code, namely pxa_request_dma() and pxa_free_dma(). These symbols
are available only in pxa, which makes impossible to build the driver in
other platforms than ARCH_PXA.

In order to handle non-dma capable platforms, we implement a fallbacks that
allocate buffers as if 'use_dma=false', putting the dma related code
under the ARCH_HAS_DMA conditional.

Please note that the correct way to handle this is to migrate the
dma code to use of the mmp_pdma dmaengine driver. However, currently
this is not possible because the two dmaengine drivers can't work together.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/pxa3xx_nand.c