aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-02-14 03:41:09 -0500
committerVinod Koul <vinod.koul@intel.com>2013-02-14 04:44:36 -0500
commit877e86f28385407f05c5aa4e397d4ccb3233f01a (patch)
tree5467a9c9360f49b6ff1d2d0a0f8e8347767904f6 /drivers/dma
parenta20702b8d7c2b54a618e203d94b37b4f1d21bbd4 (diff)
dw_dmac: apply default dma_mask if needed
In some cases we got the device without dma_mask configured. We have to apply the default value to avoid crashes during memory mapping. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dw_dmac.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 6694676c9b82..4c83f18803f1 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1661,6 +1661,12 @@ static int dw_probe(struct platform_device *pdev)
1661 if (!regs) 1661 if (!regs)
1662 return -EBUSY; 1662 return -EBUSY;
1663 1663
1664 /* Apply default dma_mask if needed */
1665 if (!pdev->dev.dma_mask) {
1666 pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
1667 pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
1668 }
1669
1664 dw_params = dma_read_byaddr(regs, DW_PARAMS); 1670 dw_params = dma_read_byaddr(regs, DW_PARAMS);
1665 autocfg = dw_params >> DW_PARAMS_EN & 0x1; 1671 autocfg = dw_params >> DW_PARAMS_EN & 0x1;
1666 1672