summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorNikhil Badola <nikhil.badola@freescale.com>2014-06-02 04:29:38 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:38:21 (GMT)
commit2b40e31a30c68ec7114b6cf5f6638fd1f017b966 (patch)
tree536e0f143b72768d40c22032102ee8195ccc6ea5 /drivers/usb
parent4b18752d4b373ec8fc40ed948b76bdbc55d01a1b (diff)
downloadlinux-fsl-qoriq-2b40e31a30c68ec7114b6cf5f6638fd1f017b966.tar.xz
drivers/usb : Set DMA_MASK of usb platform device
Set DMA_MASK of usb platform device Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com> Change-Id: I7d6387f3b95b6ec7c1999e14801dc4cfec7b016d Reviewed-on: http://git.am.freescale.net:8181/21816 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/usb')
-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 4ac390a..7640426 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 */
@@ -94,7 +95,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)