robert@axium.co.nz Posted February 23, 2017 Posted February 23, 2017 (edited) Using the dev build of Armbian for the OrangePi One, does the SPI driver in the mainline kernel support DMA? According to the mainline status page the work on SPI is done, and DMA has been supported since 4.2 I have enabled the spi interface in the device tree and my driver initialises properly with the master. But in my kernel driver I attempt to allocate some memory with dma_alloc_coherent and it fails. The driver works fine with the legacy kernel and with alternative hardware (raspberry pi). Is there some additional configuration needed or does anyone have any pointers to information on this that I look at? --edit Solved it - the mainline driver doesn't like the GFP_DMA flag being present on the dma_alloc_coherent call. Edited April 5, 2017 by robert@axium.co.nz solved
Dennboy Posted September 11, 2018 Posted September 11, 2018 Hi Robert, I recently looked at the spi controller driver and discovered that the DMA configuration is not used by the SPI controller. It found that dma_set_mask_and_coherent only gives a result until kernel version 4.13.3 (and maybe a bit later), and fails after kernel version 4.14.39 and later). The result is that the DMA configured for SPI is silently ignored, and regular SPI transfers are done instead. Can you confirm that you don't see any performance improvement with DMA enabled? Kind regards, Dennis
Recommended Posts