Page MenuHomeFreeBSD

ARM - fix bcm2835 DMA driver (rpi-b, rpi2)
ClosedPublic

Authored by skra on Nov 27 2015, 8:54 PM.
Tags
Referenced Files
Unknown Object (File)
Thu, Dec 19, 7:09 AM
Unknown Object (File)
Sun, Nov 24, 1:16 AM
Unknown Object (File)
Wed, Nov 20, 5:36 PM
Unknown Object (File)
Nov 20 2024, 12:25 AM
Unknown Object (File)
Nov 15 2024, 11:53 AM
Unknown Object (File)
Nov 7 2024, 5:00 AM
Unknown Object (File)
Nov 3 2024, 11:45 PM
Unknown Object (File)
Nov 3 2024, 11:45 PM
Subscribers

Details

Summary

It turned out that there are some DMA channels either reserved and/or used by GPU. Thus "broadcom,channels" fdt property is used to get free DMA channels mask. Further, channels known that they are used by GPU are masked out too.

More small changes was done:
(1) All remaining channels are enabled now.
(2) CS_RESET bit is used for initial channel reset.
(3) Interrupts for reserved channels are not enabled.
(4) SDHCI controller does not allocate any specific DMA channel.

As channel 3 is used by GPU, this patch solves the following warnings:
bcm_dma0: unused DMA intr CH=3, CS=20f10027

Test Plan

Tested on both rpi-b and rpi2.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

skra retitled this revision from to ARM - fix bcm2835 DMA driver (rpi-b, rpi2).
skra updated this object.
skra edited the test plan for this revision. (Show Details)
skra added reviewers: andrew, gonzo, kib.
skra set the repository for this revision to rS FreeBSD src repository - subversion.
skra added a project: ARM.
skra added a subscriber: ARM.

Shouldn't we be using the brcm,dma-channel-mask property? It's missing from our dts, but should be added.

In D4303#90643, @andrew wrote:

Shouldn't we be using the brcm,dma-channel-mask property? It's missing from our dts, but should be added.

Yes, but there is broadcom,channels property in out dts which means same. I'm not sure if it's worth to change only this property to be consistent with linux dts. The driver, of course, could try to read both properties. But what is wanted final state? If it's a conversion of all rpi like drivers for linux dts, then I think it's not necessary to do it now just for one property. Right?

Looks like broadcom,channels is older way to handle this thing. It's filled by VideoCore, brcm,dma-channel-mask is set in dtb (it's not referenced anywhere in firmware). I suggest trying brcm,dma-channel-mask and falling back to broadcom,channels if it's not provided.

This revision was automatically updated to reflect the committed changes.