From: Frank Li <Frank.li@oss.nxp.com>
To: nuno.sa@analog.com
Cc: dmaengine@vger.kernel.org, linux-iio@vger.kernel.org,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Jonathan Cameron <jic23@kernel.org>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>
Subject: Re: [PATCH 2/9] dmaengine: dma-axi-dmac: Use bus width capability helpers
Date: Thu, 30 Jul 2026 14:23:09 -0500 [thread overview]
Message-ID: <amuknWF-B6OZvf9i@SMW015318> (raw)
In-Reply-To: <20260730-dmaengine-support-wider-dma-masks-v1-2-3732f1f9d9ca@analog.com>
On Thu, Jul 30, 2026 at 03:23:09PM +0100, Nuno Sá via B4 Relay wrote:
> [You don't often get email from devnull+nuno.sa.analog.com@kernel.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> From: Nuno Sá <nuno.sa@analog.com>
>
> Advertise the source and destination bus widths through the new
> dma_set_{src,dst}_bus_width() helpers instead of open-coding the legacy
> BIT() mask. This moves the driver onto the representation that can
> express widths of 32 bytes and above while keeping the legacy u32 fields
> populated during the transition.
>
> While at it, give the channel width members their proper
> enum dma_slave_buswidth type.
>
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/dma/dma-axi-dmac.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
> index d47ff27e1408..26912330e3c8 100644
> --- a/drivers/dma/dma-axi-dmac.c
> +++ b/drivers/dma/dma-axi-dmac.c
> @@ -152,8 +152,8 @@ struct axi_dmac_chan {
> struct list_head active_descs;
> enum dma_transfer_direction direction;
>
> - unsigned int src_width;
> - unsigned int dest_width;
> + enum dma_slave_buswidth src_width;
> + enum dma_slave_buswidth dest_width;
> unsigned int src_type;
> unsigned int dest_type;
>
> @@ -1262,8 +1262,13 @@ static int axi_dmac_probe(struct platform_device *pdev)
> dma_dev->device_terminate_all = axi_dmac_terminate_all;
> dma_dev->device_synchronize = axi_dmac_synchronize;
> dma_dev->dev = &pdev->dev;
> - dma_dev->src_addr_widths = BIT(dmac->chan.src_width);
> - dma_dev->dst_addr_widths = BIT(dmac->chan.dest_width);
> + ret = dma_set_src_bus_width(dma_dev, dmac->chan.src_width);
> + if (ret)
> + return ret;
> +
> + ret = dma_set_dst_bus_width(dma_dev, dmac->chan.dest_width);
> + if (ret)
> + return ret;
> dma_dev->directions = BIT(dmac->chan.direction);
> dma_dev->residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR;
> dma_dev->max_sg_burst = 31; /* 31 SGs maximum in one burst */
>
> --
> 2.55.0
>
>
next prev parent reply other threads:[~2026-07-30 19:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 14:23 [PATCH 0/9] dmaengine: Support bus widths of 32 bytes and above Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:23 ` [PATCH 1/9] " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:38 ` sashiko-bot
2026-07-30 19:16 ` Frank Li
2026-07-30 14:23 ` [PATCH 2/9] dmaengine: dma-axi-dmac: Use bus width capability helpers Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:39 ` sashiko-bot
2026-07-30 19:23 ` Frank Li [this message]
2026-07-30 14:23 ` [PATCH 3/9] dmaengine: dw-axi-dmac: " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:36 ` sashiko-bot
2026-07-30 19:24 ` Frank Li
2026-07-30 14:23 ` [PATCH 4/9] dmaengine: qcom: gpi: " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:43 ` sashiko-bot
2026-07-30 19:25 ` Frank Li
2026-07-30 14:23 ` [PATCH 5/9] dmaengine: stm32-dma3: " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:35 ` sashiko-bot
2026-07-30 19:26 ` Frank Li
2026-07-30 14:23 ` [PATCH 6/9] iio: buffer-dmaengine: Use dma_slave_caps bus width accessors Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 19:27 ` Frank Li
2026-07-30 14:23 ` [PATCH 7/9] ALSA: pcm_dmaengine: Use dma_slave_caps bus width helpers Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 19:30 ` Frank Li
2026-07-30 14:23 ` [PATCH 8/9] spi: dw: " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:43 ` sashiko-bot
2026-07-30 19:31 ` Frank Li
2026-07-30 14:23 ` [PATCH 9/9] dmaengine: Drop legacy bus width fields from dma_slave_caps Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 19:34 ` Frank Li
2026-07-30 19:05 ` [PATCH 0/9] dmaengine: Support bus widths of 32 bytes and above Frank Li
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=amuknWF-B6OZvf9i@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=dmaengine@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.