All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 07/14] staging: fsl-mc: set up coherent dma ops for added devices
@ 2016-04-11 16:49 Stuart Yoder
  0 siblings, 0 replies; only message in thread
From: Stuart Yoder @ 2016-04-11 16:49 UTC (permalink / raw)
  To: gregkh, german.rivera
  Cc: devel, linux-kernel, agraf, arnd, leoyang.li, Stuart Yoder

From: Stuart Yoder <stuart.yoder@nxp.com>

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

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
---
 drivers/staging/fsl-mc/bus/mc-bus.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c
index 981e4c2..8bf76d7 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -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()
 	 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-11 16:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-11 16:49 [PATCH 07/14] staging: fsl-mc: set up coherent dma ops for added devices Stuart Yoder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.