From f3b30c524143af5910c711b35546cb63a876bc94 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Mon, 19 Aug 2013 22:56:05 +0900 Subject: [PATCH] ufs-pltfrm: initialize DMA mask for device-tree probed device The device-tree probed device for ARM doesn't have dev->dma_mask. So dma_set_mask() for the device doesn't succeed. The popular trick for this is - dev->dma_mask = &dev->coherent_dma_mask; Currently there is no dma_set_mask() call in ufs-pltfrm, but the forthcoming fix needs proper DMA mask setting in ufs core driver. So initializing dev->dma_mask as described above is required. Change-Id: I8428f106ca2d97badb7bf57cbb1d3ee14dddaf7f Signed-off-by: Akinobu Mita Cc: Sujit Reddy Thumma Cc: Vinayak Holikatti Cc: Santosh Y Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org Patch-mainline: linux-scsi@vger.kernel.org @ 2013/08/19 19:26 Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd-pltfrm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c index 9714f2a8b329..789946eafa2a 100644 --- a/drivers/scsi/ufs/ufshcd-pltfrm.c +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c @@ -331,6 +331,9 @@ int ufshcd_pltfrm_init(struct platform_device *pdev, pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); + if (!dev->dma_mask) + dev->dma_mask = &dev->coherent_dma_mask; + err = ufshcd_init(hba, mmio_base, irq); if (err) { dev_err(dev, "Intialization failed\n");