platform.c (b7d3622a39fde7658170b7f3cf6c6889bb8db30d) platform.c (067bd4fdfa17c3bbdac09b401667e967c81eb2b7)
1/*
2 * Platform driver for the Synopsys DesignWare DMA Controller
3 *
4 * Copyright (C) 2007-2008 Atmel Corporation
5 * Copyright (C) 2010-2011 ST Microelectronics
6 * Copyright (C) 2013 Intel Corporation
7 *
8 * Some parts of this driver are derived from the original dw_dmac.

--- 242 unchanged lines hidden (view full) ---

251 { "INTL9C60", 0 },
252 { }
253};
254MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table);
255#endif
256
257#ifdef CONFIG_PM_SLEEP
258
1/*
2 * Platform driver for the Synopsys DesignWare DMA Controller
3 *
4 * Copyright (C) 2007-2008 Atmel Corporation
5 * Copyright (C) 2010-2011 ST Microelectronics
6 * Copyright (C) 2013 Intel Corporation
7 *
8 * Some parts of this driver are derived from the original dw_dmac.

--- 242 unchanged lines hidden (view full) ---

251 { "INTL9C60", 0 },
252 { }
253};
254MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table);
255#endif
256
257#ifdef CONFIG_PM_SLEEP
258
259static int dw_suspend_noirq(struct device *dev)
259static int dw_suspend_late(struct device *dev)
260{
261 struct platform_device *pdev = to_platform_device(dev);
262 struct dw_dma_chip *chip = platform_get_drvdata(pdev);
263
264 return dw_dma_suspend(chip);
265}
266
260{
261 struct platform_device *pdev = to_platform_device(dev);
262 struct dw_dma_chip *chip = platform_get_drvdata(pdev);
263
264 return dw_dma_suspend(chip);
265}
266
267static int dw_resume_noirq(struct device *dev)
267static int dw_resume_early(struct device *dev)
268{
269 struct platform_device *pdev = to_platform_device(dev);
270 struct dw_dma_chip *chip = platform_get_drvdata(pdev);
271
272 return dw_dma_resume(chip);
273}
274
268{
269 struct platform_device *pdev = to_platform_device(dev);
270 struct dw_dma_chip *chip = platform_get_drvdata(pdev);
271
272 return dw_dma_resume(chip);
273}
274
275#else /* !CONFIG_PM_SLEEP */
275#endif /* CONFIG_PM_SLEEP */
276
276
277#define dw_suspend_noirq NULL
278#define dw_resume_noirq NULL
279
280#endif /* !CONFIG_PM_SLEEP */
281
282static const struct dev_pm_ops dw_dev_pm_ops = {
277static const struct dev_pm_ops dw_dev_pm_ops = {
283 .suspend_noirq = dw_suspend_noirq,
284 .resume_noirq = dw_resume_noirq,
285 .freeze_noirq = dw_suspend_noirq,
286 .thaw_noirq = dw_resume_noirq,
287 .restore_noirq = dw_resume_noirq,
288 .poweroff_noirq = dw_suspend_noirq,
278 SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_suspend_late, dw_resume_early)
289};
290
291static struct platform_driver dw_driver = {
292 .probe = dw_probe,
293 .remove = dw_remove,
294 .shutdown = dw_shutdown,
295 .driver = {
296 .name = "dw_dmac",

--- 20 unchanged lines hidden ---
279};
280
281static struct platform_driver dw_driver = {
282 .probe = dw_probe,
283 .remove = dw_remove,
284 .shutdown = dw_shutdown,
285 .driver = {
286 .name = "dw_dmac",

--- 20 unchanged lines hidden ---