lrwxrwxrwx 1 root root 0 Jan 1 1970 dma0chan3 -> ../../devices/platform/soc/1700000.crypto/
1700000.crypto:caam_dma/dma/dma0chan3
Component Testing
To test both the SG and memcpy capability of the CAAM DMA driver use the dmatest module provided by the kernel.
Build dmatest
Build the dmatest utility as a module by running the command:
$ make menuconfig
Then select from the kernel menuconfig to build the dmatest.ko as a module:
Device Drivers --->
<*> DMA Engine support --->
<M> DMA Test client
Configure dmatest
Before testing insert the module:
$ insmod dmatest.ko
The configure the dmatest. There is a general configuration that applies for both the sg and memcpy functionality:
$ echo 1 > /sys/module/dmatest/parameters/max_channels
$ echo 2000 > /sys/module/dmatest/parameters/timeout
$ echo 0 > /sys/module/dmatest/parameters/noverify
$ echo 4 > /sys/module/dmatest/parameters/threads_per_chan
$ echo 0 > /sys/module/dmatest/parameters/dmatest
$ echo 1 > /sys/module/dmatest/parameters/iterations
$ echo 2000 > /sys/module/dmatest/parameters/test_buf_size
The above configuration is self explanatory except a few:
If you set the 'noverify' parameter to 0 it will not perform check of the copied buffer at the end of each testing round. This should
be used for performance testing. Set the 'noverify' parameter to 1 for functional testing.
Set the 'dmatest' parameter to 0 to test the memcpy functionality and to 1 to test the sg functionality.
Perform the test
To perform the test simply run the command:
$ echo 1 > /sys/module/dmatest/parameters/run
Depending on the type of test performed (sg/memcpy) the output may vary. Here is an example of output obtained with the above
parameters:
[ 72.113769] dmatest: Started 4 threads using dma0chan0
[ 72.105334] dmatest: dma0chan0-copy0: summary 1 tests, 0 failures 9009 iops 9009 KB/s (0)
[ 72.113649] dmatest: dma0chan0-copy1: summary 1 tests, 0 failures 119 iops 119 KB/s (0)
[ 72.114927] dmatest: dma0chan0-copy2: summary 1 tests, 0 failures 24390 iops 0 KB/s (0)
[ 72.115098] dmatest: dma0chan0-copy3: summary 1 tests, 0 failures 37037 iops 0 KB/s (0)
4.2.2 Enhanced Secured Digital Host Controller (eSDHC)
Device Drivers
Layerscape LS1028A BSP User Guide, Rev. 0.3, 04/2019
NXP Semiconductors
43
Summary of Contents for Layerscape LS1028A BSP
Page 135: ......