Tests:r-car-gen3-sdhi-dma

This document describes how to test the DMA support for R-Car Gen-3 SoCs in the SDHI driver.

Kernel Version and Configuration
DMA support R-Car Gen3 SoCs for the SDHI driver is currently available in a topic branch:

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/sdhi-gen3-dma

For the tests described here the kernel was compiled with the arm64 defconfig. MMC_SDHI was also enabled.

It is critical that MMC_SDHI is enabled for this testing.

Hardware Environment

 * Board/Soc: Salvator-X/r8a7795 (Gen 3 R-Car H3 SoC)
 * MMC Card: SanDisk Card: SanDisk Ultra class 6 30MB/s 4GB marked with SD HC I

Verifying SDHI Driver Initialisation
Verify that the driver initialised the sdhi cores as described in DT.

e.g.: [   1.740328] sh_mobile_sdhi ee100000.sd: Got CD GPIO [   1.745235] sh_mobile_sdhi ee100000.sd: Got WP GPIO [   1.750381] sh_mobile_sdhi ee160000.sd: Got CD GPIO [   1.755292] sh_mobile_sdhi ee160000.sd: Got WP GPIO [   1.845880] sh_mobile_sdhi ee100000.sd: Got CD GPIO [   1.850806] sh_mobile_sdhi ee100000.sd: Got WP GPIO [   1.949051] sh_mobile_sdhi ee100000.sd: mmc0 base at 0xee100000 max clock rate 99 MHz [   1.957274] sh_mobile_sdhi ee160000.sd: Got CD GPIO [   1.963337] sh_mobile_sdhi ee160000.sd: Got WP GPIO [   2.061016] sh_mobile_sdhi ee160000.sd: mmc1 base at 0xee160000 max clock rate 99 MHz alarm ~ # [  34.461032] mmc0: new high speed SDHC card at address aaaa [  34.471230] mmcblk0: mmc0:aaaa SU04G 3.69 GiB [  34.491549]  mmcblk0: p1
 * 1) dmesg | egrep "(sdhi|tmio|mmc)"

Hardware Environment

 * Board/Soc: Salvator-X/r8a7795 (Gen 3 R-Car H3 SoC)
 * MMC Card: SanDisk Card: SanDisk Ultra class 6 30MB/s 4GB marked with SD HC I

Indicative Speed
16777216 bytes (17 MB, 16 MiB) copied, 3.53326 s, 4.7 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=16

As a speed closer to 30MB/s is expected further investigation is in progress.