devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: Andrea della Porta <andrea.porta@suse.com>
Cc: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Florian Fainelli <florian.fainelli@broadcom.com>,
	Ray Jui <rjui@broadcom.com>,
	 Scott Branden <sbranden@broadcom.com>,
	 Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Saenz Julienne <nsaenz@kernel.org>,
	 dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 00/15] dmaengine: bcm2835: add BCM2711 40-bit DMA support
Date: Tue, 12 Mar 2024 17:16:32 +0000	[thread overview]
Message-ID: <CAPY8ntCcz7ysTq_78Rb8ohLLETTYZeoZ3DXdPFvDLAkPc9jPWw@mail.gmail.com> (raw)
In-Reply-To: <cover.1710226514.git.andrea.porta@suse.com>

Hi Andrea

On Tue, 12 Mar 2024 at 09:12, Andrea della Porta <andrea.porta@suse.com> wrote:
>
> * Spam *
> 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.

Please hold fire on these patches until we resolve the dma-ranges question.
If the dma-ranges are defined correctly, then the cb_offset is not
required as the mapping deals with it.

At present we have a mess with the 32bit DMA controllers, and need to
clean it up whilst still having old DT files work. Fixing it up also
requires fixing the DMA users (primarily MMC, SPI, and vc4 HDMI
audio), so will need some care over patch ordering to avoid
regressions.
If at all possible then I would like to avoid the same mess on the 40
bit controllers too.

Thanks
  Dave

FWIW my work in progress branch is currently
https://github.com/6by9/linux/tree/mainline_2712_rp1_dma_vc4_rc5,
which includes my fixed up set of Stefan's patches, as well as all the
other patches that need working on for Pi5 support upstream.

> Many thanks,
>
> Andrea
>
> Links:
> [1] https://lore.kernel.org/linux-arm-kernel/cover.1706948717.git.andrea.porta@suse.com/
> [2] https://lore.kernel.org/linux-arm-kernel/13ec386b-2305-27da-9765-8fa3ad71146c@i2se.com/T/
> [3] https://lore.kernel.org/linux-arm-kernel/YguMW8n1q0ZV5tKH@matsya/
> [4] https://lore.kernel.org/linux-arm-kernel/1e71c153-e482-409c-b229-9b9c0662b67e@arm.com/
> [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(-)
>
> --
> 2.35.3
>
>

  reply	other threads:[~2024-03-12 17:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 14:08 [PATCH v2 00/15] dmaengine: bcm2835: add BCM2711 40-bit DMA support Andrea della Porta
2024-03-12 17:16 ` Dave Stevenson [this message]
2024-03-13 14:33   ` Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 01/15] dmaengine: bcm2835: Fix several spellos Andrea della Porta
2024-03-13 15:00   ` Florian Fainelli
2024-03-13 15:26     ` Andrea della Porta
2024-03-13 16:38       ` Florian Fainelli
2024-03-13 16:49         ` Andrea della Porta
2024-03-13 17:14           ` Florian Fainelli
2024-03-13 14:08 ` [PATCH v2 02/15] dmaengine: bcm2835: Add support for per-channel flags Andrea della Porta
2024-03-17 12:55   ` Stefan Wahren
2024-03-13 14:08 ` [PATCH v2 03/15] dmaengine: bcm2835: Add NO_WAIT_RESP, DMA_WIDE_SOURCE and DMA_WIDE_DEST flag Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 04/15] dmaengine: bcm2835: Support dma flags for multi-beat burst Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 05/15] dmaengine: bcm2835: Fixes for dma_abort Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 06/15] dmaengine: bcm2835: Support common dma-channel-mask Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 07/15] dmaengine: bcm2835: move CB info generation into separate function Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 08/15] dmaengine: bcm2835: move CB final extra info generation into function Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 09/15] dmaengine: bcm2835: make address increment platform independent Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 10/15] dmaengine: bcm2385: drop info parameters Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 11/15] dmaengine: bcm2835: pass dma_chan to generic functions Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 12/15] dmaengine: bcm2835: introduce multi platform support Andrea della Porta
2024-03-12 17:05   ` Dave Stevenson
2024-03-13 14:49     ` Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 13/15] dt-bindings: dma: Added bcm2711-dma Andrea della Porta
2024-03-12 16:17   ` Krzysztof Kozlowski
2024-03-13 15:16     ` Andrea della Porta
2024-03-13 14:08 ` [PATCH v2 14/15] dmaengine: bcm2835: Add BCM2711 40-bit DMA support Andrea della Porta
2024-03-17 12:38   ` Stefan Wahren
2024-03-13 14:08 ` [PATCH v2 15/15] ARM: dts: bcm2711: add bcm2711-dma node Andrea della Porta
2024-04-14  6:26   ` Krzysztof Kozlowski
2024-04-29 14:13     ` Andrea della Porta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPY8ntCcz7ysTq_78Rb8ohLLETTYZeoZ3DXdPFvDLAkPc9jPWw@mail.gmail.com \
    --to=dave.stevenson@raspberrypi.com \
    --cc=andrea.porta@suse.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=nsaenz@kernel.org \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).