forked from Minki/linux
9d7fd21acb
Fix doubled clock disable and unprepare during PM suspend which triggered the warnings: WARNING: at drivers/clk/clk.c:800 clk_disable+0x18/0x24() Modules linked in: CPU: 0 PID: 1745 Comm: sh Not tainted 3.10.14-01211-ge2549bb-dirty #62 [<c0015980>] (unwind_backtrace+0x0/0x138) from [<c0012a44>] (show_stack+0x10/0x14) [<c0012a44>] (show_stack+0x10/0x14) from [<c0022818>] (warn_slowpath_common+0x4c/0x68) [<c0022818>] (warn_slowpath_common+0x4c/0x68) from [<c0022850>] (warn_slowpath_null+0x1c/0x24) [<c0022850>] (warn_slowpath_null+0x1c/0x24) from [<c036e274>] (clk_disable+0x18/0x24) [<c036e274>] (clk_disable+0x18/0x24) from [<c02d5f78>] (s3c64xx_spi_suspend+0x28/0x54) [<c02d5f78>] (s3c64xx_spi_suspend+0x28/0x54) from [<c02b3a54>] (platform_pm_suspend+0x2c/0x5c) [<c02b3a54>] (platform_pm_suspend+0x2c/0x5c) from [<c02b8a30>] (dpm_run_callback+0x44/0x7c) [<c02b8a30>] (dpm_run_callback+0x44/0x7c) from [<c02b8b70>] (__device_suspend+0x108/0x300) [<c02b8b70>] (__device_suspend+0x108/0x300) from [<c02ba4e0>] (dpm_suspend+0x54/0x208) [<c02ba4e0>] (dpm_suspend+0x54/0x208) from [<c0066bcc>] (suspend_devices_and_enter+0x98/0x458) [<c0066bcc>] (suspend_devices_and_enter+0x98/0x458) from [<c0067150>] (pm_suspend+0x1c4/0x25c) [<c0067150>] (pm_suspend+0x1c4/0x25c) from [<c0066044>] (state_store+0x6c/0xbc) [<c0066044>] (state_store+0x6c/0xbc) from [<c0203290>] (kobj_attr_store+0x14/0x20) [<c0203290>] (kobj_attr_store+0x14/0x20) from [<c0157530>] (sysfs_write_file+0xfc/0x164) [<c0157530>] (sysfs_write_file+0xfc/0x164) from [<c00fd6b0>] (vfs_write+0xbc/0x1bc) [<c00fd6b0>] (vfs_write+0xbc/0x1bc) from [<c00fdaf0>] (SyS_write+0x40/0x68) [<c00fdaf0>] (SyS_write+0x40/0x68) from [<c000ea80>] (ret_fast_syscall+0x0/0x3c) The clocks may be already disabled before suspending. Check PM runtime suspend status and disable clocks only if device is not suspended. During resume do not enable the clocks if device is runtime suspended. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
spi-altera.c | ||
spi-ath79.c | ||
spi-atmel.c | ||
spi-au1550.c | ||
spi-bcm63xx.c | ||
spi-bcm2835.c | ||
spi-bfin5xx.c | ||
spi-bfin-sport.c | ||
spi-bfin-v3.c | ||
spi-bitbang-txrx.h | ||
spi-bitbang.c | ||
spi-butterfly.c | ||
spi-clps711x.c | ||
spi-coldfire-qspi.c | ||
spi-davinci.c | ||
spi-dw-mid.c | ||
spi-dw-mmio.c | ||
spi-dw-pci.c | ||
spi-dw.c | ||
spi-dw.h | ||
spi-efm32.c | ||
spi-ep93xx.c | ||
spi-falcon.c | ||
spi-fsl-cpm.c | ||
spi-fsl-cpm.h | ||
spi-fsl-dspi.c | ||
spi-fsl-espi.c | ||
spi-fsl-lib.c | ||
spi-fsl-lib.h | ||
spi-fsl-spi.c | ||
spi-fsl-spi.h | ||
spi-gpio.c | ||
spi-imx.c | ||
spi-lm70llp.c | ||
spi-mpc52xx-psc.c | ||
spi-mpc52xx.c | ||
spi-mpc512x-psc.c | ||
spi-mxs.c | ||
spi-nuc900.c | ||
spi-oc-tiny.c | ||
spi-octeon.c | ||
spi-omap2-mcspi.c | ||
spi-omap-100k.c | ||
spi-omap-uwire.c | ||
spi-orion.c | ||
spi-pl022.c | ||
spi-ppc4xx.c | ||
spi-pxa2xx-dma.c | ||
spi-pxa2xx-pci.c | ||
spi-pxa2xx-pxadma.c | ||
spi-pxa2xx.c | ||
spi-pxa2xx.h | ||
spi-rspi.c | ||
spi-s3c24xx-fiq.h | ||
spi-s3c24xx-fiq.S | ||
spi-s3c24xx.c | ||
spi-s3c64xx.c | ||
spi-sc18is602.c | ||
spi-sh-hspi.c | ||
spi-sh-msiof.c | ||
spi-sh-sci.c | ||
spi-sh.c | ||
spi-sirf.c | ||
spi-tegra20-sflash.c | ||
spi-tegra20-slink.c | ||
spi-tegra114.c | ||
spi-ti-qspi.c | ||
spi-ti-ssp.c | ||
spi-tle62x0.c | ||
spi-topcliff-pch.c | ||
spi-txx9.c | ||
spi-xcomm.c | ||
spi-xilinx.c | ||
spi.c | ||
spidev.c |