From: Frank Li <Frank.li@oss.nxp.com>
To: "Nuno Sá" <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 v2 9/9] dmaengine: Drop legacy bus width fields from dma_slave_caps
Date: Mon, 10 Aug 2026 11:56:58 -0500 [thread overview]
Message-ID: <anoC2nCE2wjYBKYL@SMW015318> (raw)
In-Reply-To: <20260810-dmaengine-support-wider-dma-masks-v2-9-1f7b798d035f@analog.com>
On Mon, Aug 10, 2026 at 04:06:50PM +0100, Nuno Sá wrote:
> All users of dma_get_slave_caps() that inspect bus width capabilities now
> use the bitmap helpers.
>
> Hence, remove the legacy u32 src_addr_widths and dst_addr_widths fields
> from struct dma_slave_caps and stop copying the dma_device masks into
> them.
>
> Note the legacy u32 src_addr_widths and dst_addr_widths fields in struct
> dma_device are kept for now as every DMA controller driver setting them
> still has to be converted to the new helpers. dma_get_slave_caps() keeps
> folding those masks into the bitmaps it returns so unconverted producers
> continue to work during the transition.
>
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/dma/dmaengine.c | 2 --
> include/linux/dmaengine.h | 16 ++--------------
> 2 files changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
> index a80a84cf87eb..36e9b6ddd88d 100644
> --- a/drivers/dma/dmaengine.c
> +++ b/drivers/dma/dmaengine.c
> @@ -592,7 +592,6 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
> if (!device->directions)
> return -ENXIO;
>
> - caps->src_addr_widths = device->src_addr_widths;
> if (bitmap_empty(device->src_bus_widths, DMA_SLAVE_BUSWIDTH_MAX)) {
> bitmap_zero(caps->src_bus_widths, DMA_SLAVE_BUSWIDTH_MAX);
> bitmap_from_arr32(caps->src_bus_widths,
> @@ -602,7 +601,6 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
> DMA_SLAVE_BUSWIDTH_MAX);
> }
>
> - caps->dst_addr_widths = device->dst_addr_widths;
> if (bitmap_empty(device->dst_bus_widths, DMA_SLAVE_BUSWIDTH_MAX)) {
> bitmap_zero(caps->dst_bus_widths, DMA_SLAVE_BUSWIDTH_MAX);
> bitmap_from_arr32(caps->dst_bus_widths,
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index 8697583e2ed3..4efaa27e9f7e 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -503,9 +503,7 @@ enum dma_residue_granularity {
> * @src_bus_widths: bitmap of source bus widths the channel supports.
> * Width is specified in bytes, e.g. for a channel supporting
> * a width of 4 the bitmap should have bit 4 set.
> - * @src_addr_widths: legacy bit mask of source bus widths the channel supports.
> * @dst_bus_widths: bitmap of destination bus widths the channel supports.
> - * @dst_addr_widths: legacy bit mask of destination bus widths the channel supports.
> * @directions: bit mask of slave directions the channel supports.
> * Since the enum dma_transfer_direction is not defined as bit flag for
> * each type, the dma controller should set BIT(<TYPE>) and same
> @@ -524,14 +522,8 @@ enum dma_residue_granularity {
> * resubmitted multiple times
> */
> struct dma_slave_caps {
> - struct {
> - DECLARE_DMA_BUS_WIDTHS(src_bus_widths);
> - u32 src_addr_widths;
> - };
> - struct {
> - DECLARE_DMA_BUS_WIDTHS(dst_bus_widths);
> - u32 dst_addr_widths;
> - };
> + DECLARE_DMA_BUS_WIDTHS(src_bus_widths);
> + DECLARE_DMA_BUS_WIDTHS(dst_bus_widths);
> u32 directions;
> u32 min_burst;
> u32 max_burst;
> @@ -1922,8 +1914,6 @@ dma_slave_caps_clear_src_width(struct dma_slave_caps *caps,
> enum dma_slave_buswidth width)
> {
> __clear_bit(width, caps->src_bus_widths);
> - if (width < DMA_SLAVE_BUSWIDTH_32_BYTES)
> - caps->src_addr_widths &= ~BIT(width);
> }
>
> /**
> @@ -1936,8 +1926,6 @@ dma_slave_caps_clear_dst_width(struct dma_slave_caps *caps,
> enum dma_slave_buswidth width)
> {
> __clear_bit(width, caps->dst_bus_widths);
> - if (width < DMA_SLAVE_BUSWIDTH_32_BYTES)
> - caps->dst_addr_widths &= ~BIT(width);
> }
>
> static inline int __dma_set_bus_widths(unsigned long *bus_widths,
>
> --
> 2.55.0
>
prev parent reply other threads:[~2026-08-10 16:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 15:06 [PATCH v2 0/9] dmaengine: Support bus widths of 32 bytes and above Nuno Sá
2026-08-10 15:06 ` [PATCH v2 1/9] " Nuno Sá
2026-08-10 15:17 ` sashiko-bot
2026-08-10 17:15 ` Andy Shevchenko
2026-08-11 8:46 ` Nuno Sá
2026-08-11 17:58 ` Vinod Koul
2026-08-12 9:08 ` Nuno Sá
2026-08-12 9:38 ` Nuno Sá
2026-08-12 9:50 ` Andy Shevchenko
2026-08-12 9:48 ` Andy Shevchenko
2026-08-12 12:18 ` Nuno Sá
2026-08-12 12:59 ` Nuno Sá
2026-08-13 6:30 ` Andy Shevchenko
2026-08-13 13:17 ` Nuno Sá
2026-08-10 15:06 ` [PATCH v2 2/9] dmaengine: dma-axi-dmac: Use bus width capability helpers Nuno Sá
2026-08-10 15:06 ` [PATCH v2 3/9] dmaengine: dw-axi-dmac: " Nuno Sá
2026-08-10 15:18 ` sashiko-bot
2026-08-10 15:06 ` [PATCH v2 4/9] dmaengine: qcom: gpi: " Nuno Sá
2026-08-10 15:15 ` sashiko-bot
2026-08-10 15:06 ` [PATCH v2 5/9] dmaengine: stm32-dma3: " Nuno Sá
2026-08-28 12:40 ` Amelie Delaunay
2026-08-31 11:31 ` Nuno Sá
2026-08-10 15:06 ` [PATCH v2 6/9] iio: buffer-dmaengine: Use dma_slave_caps bus width accessors Nuno Sá
2026-08-10 15:32 ` sashiko-bot
2026-08-12 4:48 ` Jonathan Cameron
2026-08-10 15:06 ` [PATCH v2 7/9] ALSA: pcm_dmaengine: Use dma_slave_caps bus width helpers Nuno Sá
2026-08-10 15:06 ` [PATCH v2 8/9] spi: dw: " Nuno Sá
2026-08-10 15:28 ` sashiko-bot
2026-08-10 15:06 ` [PATCH v2 9/9] dmaengine: Drop legacy bus width fields from dma_slave_caps Nuno Sá
2026-08-10 16:56 ` Frank Li [this message]
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=anoC2nCE2wjYBKYL@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.