Skip to content

dmaengine: bcm2835: add BCM2711 40-bit DMA support

Andrea della Porta dmaengine linux-arm-kernel linux-devicetree lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest15 patches 15 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15dmaengine: bcm2835: Fix several spellosdrivers/dma/bcm2835-dma.c+48 -485 replies
2/15dmaengine: bcm2835: Add support for per-channel flagsdrivers/dma/bcm2835-dma.c+8 -21 reply
3/15dmaengine: bcm2835: Add NO_WAIT_RESP, DMA_WIDE_SOURCE and DMA_WIDE_DEST flagdrivers/dma/bcm2835-dma.c+21 -40 replies
4/15dmaengine: bcm2835: Support dma flags for multi-beat burstdrivers/dma/bcm2835-dma.c+12 -40 replies
5/15dmaengine: bcm2835: Fixes for dma_abortdrivers/dma/bcm2835-dma.c+23 -90 replies
6/15dmaengine: bcm2835: Support common dma-channel-maskdrivers/dma/bcm2835-dma.c+13 -60 replies
7/15dmaengine: bcm2835: move CB info generation into separate functiondrivers/dma/bcm2835-dma.c+32 -220 replies
8/15dmaengine: bcm2835: move CB final extra info generation into functiondrivers/dma/bcm2835-dma.c+25 -60 replies
9/15dmaengine: bcm2835: make address increment platform independentdrivers/dma/bcm2835-dma.c+22 -60 replies
10/15dmaengine: bcm2385: drop info parametersdrivers/dma/bcm2835-dma.c+39 -410 replies
11/15dmaengine: bcm2835: pass dma_chan to generic functionsdrivers/dma/bcm2835-dma.c+14 -100 replies
12/15dmaengine: bcm2835: introduce multi platform supportdrivers/dma/bcm2835-dma.c+260 -762 replies
13/15dt-bindings: dma: Added bcm2711-dmaDocumentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml+3 -12 replies
14/15dmaengine: bcm2835: Add BCM2711 40-bit DMA supportdrivers/dma/bcm2835-dma.c+466 -871 reply
15/15ARM: dts: bcm2711: add bcm2711-dma nodearch/arm/boot/dts/broadcom/bcm2711.dtsi+16 -02 replies

Reviews trailers per patch

1 of 15 patches has a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiDom CobleyPhil ElwellMaxime RipardStefan Wahren
1/15
2/15
3/15Originally-by Originally-by
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15A-b
14/15Originally-by Originally-by Originally-by
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/15] dmaengine: bcm2835: add BCM2711 40-bit DMA support

The BCM2711 has 4 DMA channels with a 40-bit address range, allowing them to access the full 4GB of memory on a Pi 4.
This patchset aims to update the dma engine for BCM* chipset with respect to current advancements in downstream vendor tree. In particular, it supports the BCM2711 DMA engine in terms of extended DMA addressing to 40 bit.

Changes with respect to the first version (see [1]) of this patchset:

* dropped support of the new BCM2712. It will be the focus of a subsequent patch.

* merged patchset from Stefan Wahren [2] to support newer chipset with a platform agnostic design, while also retaining the new features added from downstream [1], as follows:

- patches from 1 to 5 are preparatory, adding some features and bugfix common to all chipsets.
- patches from 6 to 12 add hw abstraction
- patches 13 to 15 eventually add 40 bit and BCM2711 support

* fixed a couple of bugs from [2] relative to address shifting on 40 bit support specific code

* added the relevant entries in the dts and DT binding that was missing in the first patch

* used FIELD_PREP() wherever appropriate as advised in [3]

* of_match_node() has been replaced by the more generic device_get_match_data(), as per [4]

* fixed several errors and warnings from checkpatch

Please note that there is still a pending discussion around here [5]:
this patch still use the current approach (used in both downstream code and in Stefan's redesigned patchset) of getting the address as it is (dma_addr_t) and just add the relevant offset when needed (on 40 bit channel, see .addr_offset in struct bcm2835_dma_cfg). This is not optimal but still deemed as less hacky than using DMA internals (see [6]). As soon as there will be guidelines for [5] or dma_map_resource() will take care of dma_ranges, a subsequent patch will adjust accordingly.

Since there is an ongoing effort from Dave Stevenson to upstream a patchset with similar goals, I'm adding him to the email loop in order seek for collaboration.

NOTE: I apologize to any of you that received an incomplete patchset: unfortunately I had some issues with internal imap server that prevent correct mail delivery. I'm resending the entire patchset again to be sure everyone is getting a copy. Again, apologize for the inconvenince.

Many thanks,

Andrea

Links:
[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/
[2] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/
[3] https://lore.kernel.org/linux-arm-kernel/YguMW8n1q0ZV5tKH@matsya/
[4] https://lore.kernel.org/linux-arm-kernel/[email protected]/
[5] https://lore.kernel.org/all/CAPY8ntByJYzSv0kTAc1kY0Dp=vwrzcA0oWiPpyg7x7_BQwGSnA@mail.gmail.com/
[6] https://lkml.org/lkml/2024/2/5/1161

Andrea della Porta (11):
dmaengine: bcm2835: Fix several spellos
dmaengine: bcm2835: Support common dma-channel-mask
dmaengine: bcm2835: move CB info generation into separate function
dmaengine: bcm2835: move CB final extra info generation into function
dmaengine: bcm2835: make address increment platform independent
dmaengine: bcm2385: drop info parameters
dmaengine: bcm2835: pass dma_chan to generic functions
dmaengine: bcm2835: introduce multi platform support
dt-bindings: dma: Added bcm2711-dma
dmaengine: bcm2835: Add BCM2711 40-bit DMA support
ARM: dts: bcm2711: add bcm2711-dma node

Dom Cobley (2):
dmaengine: bcm2835: Support dma flags for multi-beat burst
dmaengine: bcm2835: Fixes for dma_abort

Phil Elwell (2):
dmaengine: bcm2835: Add support for per-channel flags
dmaengine: bcm2835: Add NO_WAIT_RESP, DMA_WIDE_SOURCE and
DMA_WIDE_DEST flag

 .../bindings/dma/brcm,bcm2835-dma.yaml        |    4 +-
 arch/arm/boot/dts/broadcom/bcm2711.dtsi       |   16 +
 drivers/dma/bcm2835-dma.c                     | 1084 +++++++++++++----
 3 files changed, 892 insertions(+), 212 deletions(-)
Signature · 1 line
2.35.3