diff options
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/at_hdmac.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 9a1e5fb412ed..c8522e6f1ad2 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c | |||
@@ -1166,32 +1166,37 @@ static void at_dma_shutdown(struct platform_device *pdev) | |||
1166 | clk_disable(atdma->clk); | 1166 | clk_disable(atdma->clk); |
1167 | } | 1167 | } |
1168 | 1168 | ||
1169 | static int at_dma_suspend_late(struct platform_device *pdev, pm_message_t mesg) | 1169 | static int at_dma_suspend_noirq(struct device *dev) |
1170 | { | 1170 | { |
1171 | struct at_dma *atdma = platform_get_drvdata(pdev); | 1171 | struct platform_device *pdev = to_platform_device(dev); |
1172 | struct at_dma *atdma = platform_get_drvdata(pdev); | ||
1172 | 1173 | ||
1173 | at_dma_off(platform_get_drvdata(pdev)); | 1174 | at_dma_off(platform_get_drvdata(pdev)); |
1174 | clk_disable(atdma->clk); | 1175 | clk_disable(atdma->clk); |
1175 | return 0; | 1176 | return 0; |
1176 | } | 1177 | } |
1177 | 1178 | ||
1178 | static int at_dma_resume_early(struct platform_device *pdev) | 1179 | static int at_dma_resume_noirq(struct device *dev) |
1179 | { | 1180 | { |
1180 | struct at_dma *atdma = platform_get_drvdata(pdev); | 1181 | struct platform_device *pdev = to_platform_device(dev); |
1182 | struct at_dma *atdma = platform_get_drvdata(pdev); | ||
1181 | 1183 | ||
1182 | clk_enable(atdma->clk); | 1184 | clk_enable(atdma->clk); |
1183 | dma_writel(atdma, EN, AT_DMA_ENABLE); | 1185 | dma_writel(atdma, EN, AT_DMA_ENABLE); |
1184 | return 0; | 1186 | return 0; |
1185 | |||
1186 | } | 1187 | } |
1187 | 1188 | ||
1189 | static struct dev_pm_ops at_dma_dev_pm_ops = { | ||
1190 | .suspend_noirq = at_dma_suspend_noirq, | ||
1191 | .resume_noirq = at_dma_resume_noirq, | ||
1192 | }; | ||
1193 | |||
1188 | static struct platform_driver at_dma_driver = { | 1194 | static struct platform_driver at_dma_driver = { |
1189 | .remove = __exit_p(at_dma_remove), | 1195 | .remove = __exit_p(at_dma_remove), |
1190 | .shutdown = at_dma_shutdown, | 1196 | .shutdown = at_dma_shutdown, |
1191 | .suspend_late = at_dma_suspend_late, | ||
1192 | .resume_early = at_dma_resume_early, | ||
1193 | .driver = { | 1197 | .driver = { |
1194 | .name = "at_hdmac", | 1198 | .name = "at_hdmac", |
1199 | .pm = &at_dma_dev_pm_ops, | ||
1195 | }, | 1200 | }, |
1196 | }; | 1201 | }; |
1197 | 1202 | ||