Tests:I2C-core-DMA
!SUPER EARLY DRAFT!
This document describes how to test that the Linux I2C core properly handles DMA buffers. The I2C IP cores of a Renesas R-Car M3-W serve as examples here.
Contents
Setup
Kernel Version and Configuration
Support for this feature is expected to land upstream in v4.13. It is currently available in a topic branch:
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/topic/i2c-core-dma
The following kernel options need to be set in addition to the defconfig:
CONFIG_DMA_API_DEBUG=y
Hardware Environment
- Salvator-X/r8a7796 (R-Car M3-W SoC)
Software Environment
Besides a busybox, the i2cdump utility from the i2c-tools package is needed.
Testing
We use the following command to to trigger DMA:
i2cdump -y -f 2 0x10 i # I2C/i2c-rcar i2cdump -y -f 7 0x50 i # IIC_DVFS/i2c-sh_mobile