[PATCH v3 4/9] dmaengine: qcom: gpi: Use bus width capability helpers
Nuno Sá
nuno.sa at analog.com
Mon Aug 31 04:46:41 PDT 2026
Advertise the single supported source and destination bus width through
the new dma_set_src_bus_width() and dma_set_dst_bus_width() helpers
instead of assigning the legacy u32 fields directly.
Reviewed-by: Frank Li <Frank.Li at nxp.com>
Signed-off-by: Nuno Sá <nuno.sa at analog.com>
---
drivers/dma/qcom/gpi.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
index a5055a6273af..3a35bf4c3397 100644
--- a/drivers/dma/qcom/gpi.c
+++ b/drivers/dma/qcom/gpi.c
@@ -7,6 +7,7 @@
#include <dt-bindings/dma/qcom-gpi.h>
#include <linux/bitfield.h>
#include <linux/dma-mapping.h>
+#include <linux/dma/engine/widthmask.h>
#include <linux/dmaengine.h>
#include <linux/module.h>
#include <linux/of_dma.h>
@@ -2265,8 +2266,15 @@ static int gpi_probe(struct platform_device *pdev)
/* configure dmaengine apis */
gpi_dev->dma_device.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
gpi_dev->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR;
- gpi_dev->dma_device.src_addr_widths = DMA_SLAVE_BUSWIDTH_8_BYTES;
- gpi_dev->dma_device.dst_addr_widths = DMA_SLAVE_BUSWIDTH_8_BYTES;
+ ret = dma_bus_width_set(gpi_dev->dma_device.src_bus_widths,
+ DMA_SLAVE_BUSWIDTH_8_BYTES);
+ if (ret)
+ return ret;
+
+ ret = dma_bus_width_set(gpi_dev->dma_device.dst_bus_widths,
+ DMA_SLAVE_BUSWIDTH_8_BYTES);
+ if (ret)
+ return ret;
gpi_dev->dma_device.device_alloc_chan_resources = gpi_alloc_chan_resources;
gpi_dev->dma_device.device_free_chan_resources = gpi_free_chan_resources;
gpi_dev->dma_device.device_tx_status = dma_cookie_status;
--
2.55.0
More information about the linux-arm-kernel
mailing list