summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Jardin <vjardin@free.fr>2026-07-31 22:13:49 +0200
committerChristophe Leroy (CS GROUP) <chleroy@kernel.org>2026-09-07 20:44:40 +0200
commitf85e5ec18eb104574433caec67f452dd6e02d5de (patch)
tree41290f86d8c422aeb894e8d5b597da8375f69ccb
parentbada60f2d98c7cf252b1f8214e5b6ec96c429588 (diff)
downloadlinux-next-f85e5ec18eb104574433caec67f452dd6e02d5de.tar.gz
linux-next-f85e5ec18eb104574433caec67f452dd6e02d5de.zip
bus: fsl-mc: set dma_mask for the DPRC devices
On Layerscape platforms when SMMU is disabled by ATF, the root DPRC probes with its dma_mask pointer unset which leads to a notification: "DMA mask not set" so the device is left with a zero DMA mask instead of a sane default. Let's seed the masks for all cases. It was tested on LX2160A with no SMMU on the MC domain: the warning is gone and the DPAA2 children probe unchanged. Signed-off-by: Vincent Jardin <vjardin@free.fr> Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/20260731-for-upstream-fsl-mc-dprc-dma-mask-v2-1-ea7058b90f06@free.fr Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
-rw-r--r--drivers/bus/fsl-mc/fsl-mc-bus.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
index 66a4fa73c5b8..0766ccb68629 100644
--- a/drivers/bus/fsl-mc/fsl-mc-bus.c
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
@@ -797,6 +797,10 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
}
dev_set_name(&mc_dev->dev, "%s.%d", obj_desc->type, obj_desc->id);
+ mc_dev->dma_mask = FSL_MC_DEFAULT_DMA_MASK;
+ mc_dev->dev.dma_mask = &mc_dev->dma_mask;
+ mc_dev->dev.coherent_dma_mask = mc_dev->dma_mask;
+
if (strcmp(obj_desc->type, "dprc") == 0) {
struct fsl_mc_io *mc_io2;
@@ -838,9 +842,6 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
* parent's ICID.
*/
mc_dev->icid = parent_mc_dev->icid;
- mc_dev->dma_mask = FSL_MC_DEFAULT_DMA_MASK;
- mc_dev->dev.dma_mask = &mc_dev->dma_mask;
- mc_dev->dev.coherent_dma_mask = mc_dev->dma_mask;
}
/*