]> 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)
commitf4f27983e820a5c2a25ec850d5502b11524c2fe6
treeb2c9d11fc24acdb9b2825b68b614f78c8c2f16fe
parentd6d992713f48ffd584e2881f5814cc0211d498da
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