mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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>
This commit is contained in:
parent
bada60f2d9
commit
f85e5ec18e
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user