List of pheripherals using DMA

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Posts: 2
Joined: Thu Feb 06, 2020 12:20 pm

List of pheripherals using DMA

Thu Jul 16, 2020 12:36 pm

i want to configure DMA for USART1 and SPI0 on SAMA5D35. I am able to configure DMA for USART0 or SPI0 by enabling/disabling in dts, but not for both. In case of enable DMA for both pheripherals, dmesg tell me "DMA is not avaible, switching to pio". This is clear for me, there are no free resources. I am able to list /sys/class/dma/../in_use to see avaible channels, there all of them occupied. Could I find somewhere in kernel (? /proc or /sys) list of pheripherals occupied DMA channels? Dmesg writes during kernel boot only few ot them.
Does anybody idea? Im not able to google it in at all.
Location: USA
Posts: 2152
Joined: Thu Apr 19, 2007 10:15 pm

Re: List of peripherals using DMA

Fri Jul 17, 2020 1:33 am

You neglect to mention which kernel version you are using.

Regardless, you can manually extract the salient information (i.e. the peripheral ID number) directly from each DMAC channel configuration register.
Use the devmem command that is available in Busybox.
Refer to the SoC datasheet for the addresses of each channel configuration register and the register layout.

Posts: 2
Joined: Thu Feb 06, 2020 12:20 pm

Re: List of pheripherals using DMA

Fri Jul 17, 2020 12:59 pm

Kernel version is 4.14.88 (at91). I did hope there is some simplifier method. Thanks for hint with devmem, i will extract it with this way.

Site Admin
Posts: 226
Joined: Wed Feb 14, 2007 11:17 am

Re: List of pheripherals using DMA

Mon Jul 20, 2020 1:53 pm

Another idea is to read them in the device tree that you use. You can even decompile the dtb itself with the "dtc -I dtb -O dts" command.
Best regards

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 8 guests