Tests:SDHI-DMA-callback-timing

From eLinux.org
Jump to: navigation, search

Template:Db-author This page is still a draft

This document describes how to test for SDHI that DMA requests and SD accesses are properly finished before proceeding with the next command.

Setup

Kernel Version and Configuration

Support for this feature is expected to land upstream in v4.12. It is currently available in a topic branch:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/topic/<fixme>

It is critical that CONFIG_MMC_SDHI and CONFIG_MMC_DEBUG is enabled for these tests. The filesystem of the SD card must be supported.

Hardware Environment

  • Lager/r8a7790 (R-Car H2 SoC) with a microSD card (formatted with a file system) inserted into CN8 (SDHI0)

Testing (preliminary)

An additional patch will be provided which will add output to the kernel log. It will describe which event happened first (DMA end or SD access end), second, and when the whole transfer will be marked as done. Then, it can be shown that all cases are handled correctly.

To verify this, only reading the kernel log buffer will be necessary. Tests have shown that to trigger both events, booting with SD card inserted and mounting a filesystem will be sufficent.