Skip to content

raspi: add dma.resource (BCM2835 DMA channel allocator)#809

Merged
Kalamatee merged 1 commit into
aros-development-team:masterfrom
bsek:bsek/dma-resource
Jun 13, 2026
Merged

raspi: add dma.resource (BCM2835 DMA channel allocator)#809
Kalamatee merged 1 commit into
aros-development-team:masterfrom
bsek:bsek/dma-resource

Conversation

@bsek

@bsek bsek commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Introduces dma.resource for the BCM2835/2836 — a small resource (modelled
after mbox.resource) that owns DMA channel allocation and the global
DMA_ENABLE_REG. Until now each DMA user hardcoded a channel number and did
its own unlocked read-modify-write on the shared enable register, which races
and leaves the firmware-owned channel knowledge scattered across drivers.

Migrates the following off their hardcoded channels:

  • sdcard (SDHOST controller)
  • RPiPWM and RPiHDMI AHI drivers

dma.resource is added to the raspi kickstart packaging.

Note: arch/arm-raspi/boot/mmakefile.src also appears in #799 (raspi: load USB classes from disk).
This branch is based on current master and adds only the dma-packaging lines; once #799 merges this
needs a rebase (or vice-versa)

Add a resource (modelled on mbox.resource) that owns DMA channel
allocation and DMA_ENABLE_REG, replacing the hardcoded channels and
unlocked enable-register RMWs in the in-tree users. DMAAllocChannel
and DMAFreeChannel hand out channels. DMACHF_TDMODE reserves a full
2D engine and DMACHF_IRQ adds completion-IRQ wait via DMAWaitChannel.
Migrates sdcard, RPiPWM and RPiHDMI. The shared control-block layout
and bus-address alias move to <hardware/bcm2708_dma.h>.
@Kalamatee Kalamatee merged commit eeec07a into aros-development-team:master Jun 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants