]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: onenand: omap2: Simplify the DMA setup for various paths
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 12 Jan 2018 13:15:25 +0000 (14:15 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 12 Jan 2018 14:34:17 +0000 (15:34 +0100)
commitfccd81fd23c199036bcbd7b060668c3db80c1e2e
treeb2c9d11fc24acdb9b2825b68b614f78c8c2f16fe
parentc46efd425a5178b1f8d79f5a16cd385afecc5a41
mtd: onenand: omap2: Simplify the DMA setup for various paths

We have 4 functions containing almost identical DMA setup code. Create one
function which can set up the DMA for both read and write and use this in
place for the setup code in the driver.
The new function will use wait_for_completion_io_timeout() and it will
figure out the best data_type to be used for the transfer instead of
hardwiring 32 or 16 bit data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Roger Quadros <rogerq@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/onenand/omap2.c