usb: ehci-msm: Specify DMA coherent mask
EHCI msm driver uses DMA coherent memory which requires setting
dma masks correctly.
Change-Id: I4b4983f451ba2eb07277ac315df69b82ca2588bd
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 0da7cb1..fc9ef36 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -105,6 +105,7 @@
.bus_resume = ehci_bus_resume,
};
+static u64 msm_ehci_dma_mask = DMA_BIT_MASK(64);
static int ehci_msm_probe(struct platform_device *pdev)
{
struct usb_hcd *hcd;
@@ -113,6 +114,11 @@
dev_dbg(&pdev->dev, "ehci_msm proble\n");
+ if (!pdev->dev.dma_mask)
+ pdev->dev.dma_mask = &msm_ehci_dma_mask;
+ if (!pdev->dev.coherent_dma_mask)
+ pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+
hcd = usb_create_hcd(&msm_hc_driver, &pdev->dev, dev_name(&pdev->dev));
if (!hcd) {
dev_err(&pdev->dev, "Unable to create HCD\n");