Staging: goldfish: goldfish_nand: Add DMA Support using dmam_alloc_coherent
authorShraddha Barke <shraddha.6596@gmail.com>
Wed, 20 Jan 2016 21:08:53 +0000 (02:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jan 2016 07:56:47 +0000 (23:56 -0800)
commit3e2fbc7feec4426feba609b94aa89a147e02c67e
tree2ea3ade31fb994c0efcdb815bd0c4740761d1f26
parentd62f324b0ac80c3923ebbf897735c7c24ba887b8
Staging: goldfish: goldfish_nand: Add DMA Support using dmam_alloc_coherent

Function nand_setup_cmd_params has 2 goals-

-Initialize the cmd_params field so that it can be used to send and read
commands from the device.
-Get a bus address for the allocated memory to transfer to the device.

Replace the combination of devm_kzalloc and _pa() with dmam_alloc_coherent.
Coherent mapping guarantees that the device and CPU are in sync.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/goldfish/goldfish_nand.c