mmc: tmio_mmc: implement a bounce buffer for unaligned DMA
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Wed, 22 Dec 2010 11:02:15 +0000 (12:02 +0100)
committerChris Ball <cjb@laptop.org>
Sun, 9 Jan 2011 04:52:29 +0000 (23:52 -0500)
commit93173054f2979de41b1912b19f0b57edfb35fcdc
tree14c2872048dde7e15d386f1211836c86b1b6c69f
parente0bc6ff8b8d5c066d978d23e690d5599db4cb2b3
mmc: tmio_mmc: implement a bounce buffer for unaligned DMA

For example, with SDIO WLAN cards, some transfers happen with buffers at
odd addresses, whereas the SH-Mobile DMA engine requires even addresses
for SDHI. This patch extends the tmio driver with a bounce buffer, that
is used for single entry scatter-gather lists both for sending and
receiving. If we ever encounter unaligned transfers with multi-element
sg lists, this patch will have to be extended. For now it just falls
back to PIO in this and other unsupported cases.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/tmio_mmc.c
include/linux/mfd/tmio.h