Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Solved - H3 SPI with DMA using mainline kernel

Featured Replies

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 by robert@axium.co.nz
solved

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

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.