sh: prepare the DMA driver for slave functionality
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 19 Jan 2010 07:24:55 +0000 (07:24 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 8 Feb 2010 00:38:35 +0000 (09:38 +0900)
commitfc4618575f79eea062cdc51715040e40cd35b71c
tree86c3024f48db02b9f5e391d3f0a3aa787fa89375
parent6339204ecc2aa2067a99595522de0403f0854bb8
sh: prepare the DMA driver for slave functionality

Slave DMA functionality uses scatter-gather arrays for data transfers,
whereas memcpy just uses a single data buffer. This patch converts the
current memcpy implementation in shdma.c to use scatter-gather, making it
just a special case with one SG-element. This allows us to isolate
descriptor list manipulations and locking into one function, thus reducing
error chances.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/dma/shdma.c