]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mmc: rtsx: add support for pre_req and post_req
authorMicky Ching <micky_ching@realsil.com.cn>
Mon, 17 Feb 2014 08:45:48 +0000 (16:45 +0800)
committerChris Ball <chris@printf.net>
Sat, 22 Feb 2014 18:34:20 +0000 (13:34 -0500)
commitc42deffd5b53c9e583d83c7964854ede2f12410d
tree9f243972c38e08f15e612a9a13489a6b2db3ddd2
parentabcc6b2943145ae2e17a52632ccab50cd612914c
mmc: rtsx: add support for pre_req and post_req

Add support for non-blocking request, pre_req() runs dma_map_sg() and
post_req() runs dma_unmap_sg(). This patch can increase card read/write
speed, especially for high speed card and slow CPU(for some embedded
platform).

Users can get a great benefit from this patch. if CPU frequency is 800MHz,
SDR104 or DDR50 card read/write speed may increase more than 15%.

test results:
intel i3(800MHz - 2.3GHz), SD card clock 208MHz

performance mode(2.3GHz):
Before:
dd if=/dev/mmcblk0p1 of=/dev/null bs=64k count=1024
67108864 bytes (67 MB) copied, 1.18191 s, 56.8 MB/s
After:
 dd if=/dev/mmcblk0p1 of=/dev/null bs=64k count=1024
67108864 bytes (67 MB) copied, 1.09276 s, 61.4 MB/s

powersave mode(800MHz):
Before:
dd if=/dev/mmcblk0p1 of=/dev/null bs=64k count=1024
67108864 bytes (67 MB) copied, 1.29569 s, 51.8 MB/s
After:
dd if=/dev/mmcblk0p1 of=/dev/null bs=64k count=1024
67108864 bytes (67 MB) copied, 1.11218 s, 60.3 MB/s

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mfd/rtsx_pcr.c
drivers/mmc/host/rtsx_pci_sdmmc.c
include/linux/mfd/rtsx_common.h
include/linux/mfd/rtsx_pci.h