Page MenuHomeFreeBSD

arm/ti: attach EDMA3 against the split device tree binding
Needs ReviewPublic

Authored by rick_sloservers.com on Sun, Aug 23, 1:12 PM.
Tags
Referenced Files
F168582287: D59124.id.diff
Sat, Aug 29, 3:13 AM
F168582184: D59124.diff
Sat, Aug 29, 3:13 AM
Unknown Object (File)
Thu, Aug 27, 7:06 PM
Unknown Object (File)
Thu, Aug 27, 3:10 PM
Unknown Object (File)
Thu, Aug 27, 3:25 AM
Unknown Object (File)
Thu, Aug 27, 3:17 AM
Unknown Object (File)
Tue, Aug 25, 4:20 AM
Unknown Object (File)
Tue, Aug 25, 3:44 AM
Subscribers
None

Details

Summary

ti_edma3 matches ti,edma3, a compatible string no device tree has used since the binding was split. The current binding describes a channel controller (ti,edma3-tpcc) and three separate transfer controllers (ti,edma3-tptc), so the driver never attached on am335x.

Match the channel controller node, and add a small driver for the transfer controllers. They need no programming, but their target modules stay clock gated until something claims them, and a gated transfer controller accepts a request and then moves nothing — indistinguishable from a peripheral that never raised a request.

Also expose the interfaces a driver owning a channel needs: whether the controller attached, whether a transfer completed, whether an event was missed, and how to link PaRAM sets.

This is a prerequisite for offloading the MMC data phase. On its own it attaches the engine and removes three unclaimed device tree nodes from the boot output:

ti_sysc48: <dma@0> compat ti,edma3-tptc (no driver attached)
ti_sysc49: <dma@0> compat ti,edma3-tptc (no driver attached)
ti_sysc50: <dma@0> compat ti,edma3-tptc (no driver attached)
Test Plan

Boots on a BeagleBone Black Rev B3 with the channel controller and all three transfer controllers attaching.

Nothing in-tree builds these files today, since AM335x was removed from armv7 GENERIC in 3416e102c4e9, so compile coverage requires an AM335x kernel config — see D46703.

Full evidence: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297800

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

rick_sloservers.com created this revision.

Looks good and works with PB&BB, maybe add in sys/arm/files.ti something like:
arm/ti/ti_edma3.c optional sdhci | edma3