From f85e5ec18eb104574433caec67f452dd6e02d5de Mon Sep 17 00:00:00 2001 From: Vincent Jardin Date: Fri, 31 Jul 2026 22:13:49 +0200 Subject: [PATCH] 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 Reviewed-by: Ioana Ciornei 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) --- drivers/bus/fsl-mc/fsl-mc-bus.c | 7 ++++--- 1 file 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; } /*