diff options
author | Stuart Yoder <stuart.yoder@nxp.com> | 2016-04-11 16:49:13 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-30 01:00:45 (GMT) |
commit | 0f90f25b8f83f5185c0fea8fa02b6bb77917f916 (patch) | |
tree | 262a8831c95145b9146598e5f92d227a08bc3e00 /drivers | |
parent | 9787d4e05e022de73eafdf70319ae26a4978a7b9 (diff) | |
download | linux-0f90f25b8f83f5185c0fea8fa02b6bb77917f916.tar.xz |
staging: fsl-mc: set up coherent dma ops for added devices
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>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/fsl-mc/bus/mc-bus.c | 4 |
1 files changed, 4 insertions, 0 deletions
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() */ |