Skip to contentSkip to conversation

staging: fsl-mc: set up coherent dma ops for added devices

PATCH In review Stuart Yoder 1 participant 1 message Apr 11, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 7/14 staging: fsl-mc: set up coherent dma ops for added devices

From: Stuart Yoder <[email protected]>

Unless discovered devices have the no shareability flag set, set up coherent dma ops for them.

---
 drivers/staging/fsl-mc/bus/mc-bus.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/staging/fsl-mc/bus/mc-bus.c +4 -0
index 981e4c2..8bf76d7 100644
@@ -469,6 +469,10 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
 			goto error_cleanup_dev;
 	}
 
+	/* Objects are coherent, unless 'no shareability' flag set. */
+	if (!(obj_desc->flags & DPRC_OBJ_FLAG_NO_MEM_SHAREABILITY))
+		arch_setup_dma_ops(&mc_dev->dev, 0, 0, NULL, true);
+
 	/*
 	 * The device-specific probe callback will get invoked by device_add()
 	 */
Signature · 1 line
1.7.9.5