layerscape: add ls1088ardb device support
[openwrt/staging/lynxis/omap.git] / target / linux / layerscape / patches-4.4 / 7171-staging-fsl-mc-set-up-coherent-dma-ops-for-added-dev.patch
1 From 3657147d6fea1977c07373325626bf50fe15bcfc Mon Sep 17 00:00:00 2001
2 From: Stuart Yoder <stuart.yoder@nxp.com>
3 Date: Mon, 11 Apr 2016 11:49:13 -0500
4 Subject: [PATCH 171/226] staging: fsl-mc: set up coherent dma ops for added
5 devices
6
7 Unless discovered devices have the no shareability flag set,
8 set up coherent dma ops for them.
9
10 Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
11 Acked-by: German Rivera <german.rivera@nxp.com>
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 ---
14 drivers/staging/fsl-mc/bus/mc-bus.c | 4 ++++
15 1 file changed, 4 insertions(+)
16
17 --- a/drivers/staging/fsl-mc/bus/mc-bus.c
18 +++ b/drivers/staging/fsl-mc/bus/mc-bus.c
19 @@ -469,6 +469,10 @@ int fsl_mc_device_add(struct dprc_obj_de
20 goto error_cleanup_dev;
21 }
22
23 + /* Objects are coherent, unless 'no shareability' flag set. */
24 + if (!(obj_desc->flags & DPRC_OBJ_FLAG_NO_MEM_SHAREABILITY))
25 + arch_setup_dma_ops(&mc_dev->dev, 0, 0, NULL, true);
26 +
27 /*
28 * The device-specific probe callback will get invoked by device_add()
29 */