User:Uli/Tests:SCIF-DMA

From eLinux.org
Jump to: navigation, search

This document describes how to verify DMA enablement for (H)SCIF serial ports on Salvator-X boards.

Kernel Version and Configuration

  • arm64: defconfig

By default, serial port DMA is disabled. To test with DMA enabled:

CONFIG_SERIAL_SH_SCI_DMA=y

To test with DMA disabled (control):

# CONFIG_SERIAL_SH_SCI_DMA is not set

Hardware Environment

Salvator-X

(This setup is optional for simple DMA enablement verification.)

  • For testing transfers between SCIF3 and HSCIF3:
    • Connect SCIF3 TXD (EXIO Connect D pin 21) to HSCIF3 RXD (EXIO Connect D pin 28)
    • Connect SCIF3 RXD (EXIO Connect D pin 27) to HSCIF3 TXD (EXIO Connect D pin 30)


Test Procedure

Salvator-X

SCIF3 and HSCIF3 are already enabled by r8a7796-salvator-x.dts in the renesas-drivers topic branch.

Set the HSCIF3 serial port to 4MBit/s:

sertest --master -s 4000000 /dev/ttySC3

[FIXME: There should be a less obscure way to do this...]

End the sertest with Ctrl-\.

Check performance by writing 4MB of data to the serial port using dd:

time dd if=/dev/zero bs=4k count=1024 >/dev/ttySC3

Expected results:

  • With DMA disabled, the "sys" time should be between 0.020s and 0.032s.
  • With DMA enabled, the "sys" time should be between 0.012s and 0.016s.

References

Linux Kernel Source Tree

Test Software