diff options
-rw-r--r-- | drivers/dma/dw_dmac.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 98c9a847bf51..933c143b6a74 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -1399,8 +1399,9 @@ static void dw_shutdown(struct platform_device *pdev) | |||
1399 | clk_disable(dw->clk); | 1399 | clk_disable(dw->clk); |
1400 | } | 1400 | } |
1401 | 1401 | ||
1402 | static int dw_suspend_late(struct platform_device *pdev, pm_message_t mesg) | 1402 | static int dw_suspend_noirq(struct device *dev) |
1403 | { | 1403 | { |
1404 | struct platform_device *pdev = to_platform_device(dev); | ||
1404 | struct dw_dma *dw = platform_get_drvdata(pdev); | 1405 | struct dw_dma *dw = platform_get_drvdata(pdev); |
1405 | 1406 | ||
1406 | dw_dma_off(platform_get_drvdata(pdev)); | 1407 | dw_dma_off(platform_get_drvdata(pdev)); |
@@ -1408,23 +1409,27 @@ static int dw_suspend_late(struct platform_device *pdev, pm_message_t mesg) | |||
1408 | return 0; | 1409 | return 0; |
1409 | } | 1410 | } |
1410 | 1411 | ||
1411 | static int dw_resume_early(struct platform_device *pdev) | 1412 | static int dw_resume_noirq(struct device *dev) |
1412 | { | 1413 | { |
1414 | struct platform_device *pdev = to_platform_device(dev); | ||
1413 | struct dw_dma *dw = platform_get_drvdata(pdev); | 1415 | struct dw_dma *dw = platform_get_drvdata(pdev); |
1414 | 1416 | ||
1415 | clk_enable(dw->clk); | 1417 | clk_enable(dw->clk); |
1416 | dma_writel(dw, CFG, DW_CFG_DMA_EN); | 1418 | dma_writel(dw, CFG, DW_CFG_DMA_EN); |
1417 | return 0; | 1419 | return 0; |
1418 | |||
1419 | } | 1420 | } |
1420 | 1421 | ||
1422 | static struct dev_pm_ops dw_dev_pm_ops = { | ||
1423 | .suspend_noirq = dw_suspend_noirq, | ||
1424 | .resume_noirq = dw_resume_noirq, | ||
1425 | }; | ||
1426 | |||
1421 | static struct platform_driver dw_driver = { | 1427 | static struct platform_driver dw_driver = { |
1422 | .remove = __exit_p(dw_remove), | 1428 | .remove = __exit_p(dw_remove), |
1423 | .shutdown = dw_shutdown, | 1429 | .shutdown = dw_shutdown, |
1424 | .suspend_late = dw_suspend_late, | ||
1425 | .resume_early = dw_resume_early, | ||
1426 | .driver = { | 1430 | .driver = { |
1427 | .name = "dw_dmac", | 1431 | .name = "dw_dmac", |
1432 | .pm = &dw_dev_pm_ops, | ||
1428 | }, | 1433 | }, |
1429 | }; | 1434 | }; |
1430 | 1435 | ||