aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw_dmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r--drivers/dma/dw_dmac.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 8fb74828036..2eea823516a 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1407,8 +1407,9 @@ static void dw_shutdown(struct platform_device *pdev)
1407 clk_disable(dw->clk); 1407 clk_disable(dw->clk);
1408} 1408}
1409 1409
1410static int dw_suspend_late(struct platform_device *pdev, pm_message_t mesg) 1410static int dw_suspend_noirq(struct device *dev)
1411{ 1411{
1412 struct platform_device *pdev = to_platform_device(dev);
1412 struct dw_dma *dw = platform_get_drvdata(pdev); 1413 struct dw_dma *dw = platform_get_drvdata(pdev);
1413 1414
1414 dw_dma_off(platform_get_drvdata(pdev)); 1415 dw_dma_off(platform_get_drvdata(pdev));
@@ -1416,23 +1417,27 @@ static int dw_suspend_late(struct platform_device *pdev, pm_message_t mesg)
1416 return 0; 1417 return 0;
1417} 1418}
1418 1419
1419static int dw_resume_early(struct platform_device *pdev) 1420static int dw_resume_noirq(struct device *dev)
1420{ 1421{
1422 struct platform_device *pdev = to_platform_device(dev);
1421 struct dw_dma *dw = platform_get_drvdata(pdev); 1423 struct dw_dma *dw = platform_get_drvdata(pdev);
1422 1424
1423 clk_enable(dw->clk); 1425 clk_enable(dw->clk);
1424 dma_writel(dw, CFG, DW_CFG_DMA_EN); 1426 dma_writel(dw, CFG, DW_CFG_DMA_EN);
1425 return 0; 1427 return 0;
1426
1427} 1428}
1428 1429
1430static struct dev_pm_ops dw_dev_pm_ops = {
1431 .suspend_noirq = dw_suspend_noirq,
1432 .resume_noirq = dw_resume_noirq,
1433};
1434
1429static struct platform_driver dw_driver = { 1435static struct platform_driver dw_driver = {
1430 .remove = __exit_p(dw_remove), 1436 .remove = __exit_p(dw_remove),
1431 .shutdown = dw_shutdown, 1437 .shutdown = dw_shutdown,
1432 .suspend_late = dw_suspend_late,
1433 .resume_early = dw_resume_early,
1434 .driver = { 1438 .driver = {
1435 .name = "dw_dmac", 1439 .name = "dw_dmac",
1440 .pm = &dw_dev_pm_ops,
1436 }, 1441 },
1437}; 1442};
1438 1443