platform.c (e219aafe50fd546b8686582ddbafd24c3c2eda04) | platform.c (3214658855c01a0dd62f02feb2ce79846524c6a0) |
---|---|
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. --- 225 unchanged lines hidden (view full) --- 234 235 return 0; 236} 237 238static void dw_shutdown(struct platform_device *pdev) 239{ 240 struct dw_dma_chip *chip = platform_get_drvdata(pdev); 241 | 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. --- 225 unchanged lines hidden (view full) --- 234 235 return 0; 236} 237 238static void dw_shutdown(struct platform_device *pdev) 239{ 240 struct dw_dma_chip *chip = platform_get_drvdata(pdev); 241 |
242 /* 243 * We have to call dw_dma_disable() to stop any ongoing transfer. On 244 * some platforms we can't do that since DMA device is powered off. 245 * Moreover we have no possibility to check if the platform is affected 246 * or not. That's why we call pm_runtime_get_sync() / pm_runtime_put() 247 * unconditionally. On the other hand we can't use 248 * pm_runtime_suspended() because runtime PM framework is not fully 249 * used by the driver. 250 */ 251 pm_runtime_get_sync(chip->dev); |
|
242 dw_dma_disable(chip); | 252 dw_dma_disable(chip); |
253 pm_runtime_put_sync_suspend(chip->dev); 254 |
|
243 clk_disable_unprepare(chip->clk); 244} 245 246#ifdef CONFIG_OF 247static const struct of_device_id dw_dma_of_id_table[] = { 248 { .compatible = "snps,dma-spear1340" }, 249 {} 250}; --- 75 unchanged lines hidden --- | 255 clk_disable_unprepare(chip->clk); 256} 257 258#ifdef CONFIG_OF 259static const struct of_device_id dw_dma_of_id_table[] = { 260 { .compatible = "snps,dma-spear1340" }, 261 {} 262}; --- 75 unchanged lines hidden --- |