summaryrefslogtreecommitdiff
path: root/drivers/usb/host/fsl-mph-dr-of.c
diff options
context:
space:
mode:
authorSriram Dash <sriram.dash@freescale.com>2015-12-17 14:32:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-25 07:37:47 +0300
commitcae058610465029cee113ac41c7f5cf881f5cfed (patch)
tree6e6be504139f35d974f17b91d2cbc70894745cbd /drivers/usb/host/fsl-mph-dr-of.c
parent0cdd49a1d1a483d80170d9e592f832274e8bce1b (diff)
downloadlinux-cae058610465029cee113ac41c7f5cf881f5cfed.tar.xz
drivers/usb/host: fsl: Set DMA_MASK of usb platform device
Set DMA_MASK of usb platform device properly. Signed-off-by: Sriram Dash <sriram.dash@freescale.com> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/fsl-mph-dr-of.c')
-rw-r--r--drivers/usb/host/fsl-mph-dr-of.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index 0c382652a399..1044b0f9d656 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
@@ -17,6 +17,7 @@
#include <linux/of_platform.h>
#include <linux/clk.h>
#include <linux/module.h>
+#include <linux/dma-mapping.h>
struct fsl_usb2_dev_data {
char *dr_mode; /* controller mode */
@@ -96,7 +97,11 @@ static struct platform_device *fsl_usb2_device_register(
pdev->dev.parent = &ofdev->dev;
pdev->dev.coherent_dma_mask = ofdev->dev.coherent_dma_mask;
- *pdev->dev.dma_mask = *ofdev->dev.dma_mask;
+
+ if (!pdev->dev.dma_mask)
+ pdev->dev.dma_mask = &ofdev->dev.coherent_dma_mask;
+ else
+ dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
retval = platform_device_add_data(pdev, pdata, sizeof(*pdata));
if (retval)