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-v3

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

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 Cards:
 * SanDisk Card 1: SanDisk Ultra 64Gb microSDXC UHS-1. Identifier on Packaging: SDSQUNC-064G-GN6MA
 * SanDisk Card 2: SanDisk Extreme Pro 8Gb microSDHC UHS-1. Appears to be: SDSDQXP-008G-J35

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

e.g.: [   1.748460] sh_mobile_sdhi ee100000.sd: Got CD GPIO [   1.753370] sh_mobile_sdhi ee100000.sd: Got WP GPIO [   1.758519] sh_mobile_sdhi ee160000.sd: Got CD GPIO [   1.763425] sh_mobile_sdhi ee160000.sd: Got WP GPIO [   1.854162] sh_mobile_sdhi ee100000.sd: Got CD GPIO [   1.859082] sh_mobile_sdhi ee100000.sd: Got WP GPIO [   1.957174] sh_mobile_sdhi ee100000.sd: mmc0 base at 0xee100000 max clock rate 99 MHz [   1.965429] sh_mobile_sdhi ee160000.sd: Got CD GPIO [   1.970369] sh_mobile_sdhi ee160000.sd: Got WP GPIO [   2.069134] sh_mobile_sdhi ee160000.sd: mmc1 base at 0xee160000 max clock rate 99 MHz [   2.161143] mmc0: new high speed SDHC card at address e624 [   2.167130] mmcblk0: mmc0:e624 SU08G 7.40 GiB (ro) [   2.203550]  mmcblk0: p1 [    2.397127] mmc1: new high speed SDHC card at address aaaa [   2.402956] mmcblk1: mmc1:aaaa SD04G 3.69 GiB [   2.410414]  mmcblk1: p1
 * 1) dmesg | egrep "(sdhi|tmio|mmc)"

Hardware Environment

 * Board/Soc: Salvator-X/r8a7795 (Gen 3 R-Car H3 SoC)
 * MMC Cards:
 * SanDisk Card 1: SanDisk Ultra 64Gb microSDXC UHS-1. Identifier on Packaging: SDSQUNC-064G-GN6MA
 * SanDisk Card 2: SanDisk Extreme Pro 8Gb microSDHC UHS-1. Appears to be: SDSDQXP-008G-J35

Indicative Speed with DMA
The following results were obtained using topic/sdhi-gen3-dma-v3.

SanDisk Card 1: dd if=/dev/mmcblk1 of=/dev/null bs=1M count=64 67108864 bytes (67 MB) copied, 6.05601 s, 11.1 MB/s

SanDisk Card 2: dd if=/dev/mmcblk0 of=/dev/null bs=1M count=64 67108864 bytes (67 MB) copied, 5.85669 s, 11.5 MB/s

Indicative Speed without DMA
The following results were obtained using the base commit of topic/sdhi-gen3-dma-v3, 14103065ce1f ("mmc: sh_mmcif: Inform the mmc core about the max busy timeout").

SanDisk Card 1: 67108864 bytes (67 MB) copied, 17.244 s, 3.9 MB/s
 * 1) dd if=/dev/mmcblk1 of=/dev/null bs=1M count=64

SanDisk Card 2: 67108864 bytes (67 MB) copied, 17.0375 s, 3.9 MB/s
 * 1) dd if=/dev/mmcblk0 of=/dev/null bs=1M count=64