OpenCloudOS-Kernel/drivers/clk/mvebu
Thomas Petazzoni f571053152 clk: mvebu: add suspend/resume for gatable clocks
This commit adds suspend/resume support for the gatable clock driver
used on Marvell EBU platforms. When getting out of suspend, the
Marvell EBU platforms go through the bootloader, which re-enables all
gatable clocks. However, upon resume, the clock framework will not
disable again all gatable clocks that are not used.

Therefore, if the clock driver does not save/restore the state of the
gatable clocks, all gatable clocks that are not claimed by any device
driver will remain enabled after a resume. This is why this driver
saves and restores the state of those clocks.

Since clocks aren't real devices, we don't have the normal ->suspend()
and ->resume() of the device model, and have to use the ->suspend()
and ->resume() hooks of the syscore_ops mechanism. This mechanism has
the unfortunate idea of not providing a way of passing private data,
which requires us to change the driver to make the assumption that
there is only once instance of the gatable clock control structure.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: linux-kernel@vger.kernel.org
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Link: https://lkml.kernel.org/r/1416585613-2113-9-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-11-30 16:40:12 +00:00
..
Kconfig clk: mvebu: add Orion5x clock driver 2014-04-26 01:03:55 +00:00
Makefile clk: mvebu: add Orion5x clock driver 2014-04-26 01:03:55 +00:00
armada-38x.c clk: mvebu: add clock support for Armada 380/385 2014-02-17 02:34:05 +00:00
armada-370.c clk: mvebu: armada-370: Fix timer drift caused by the SSCG deviation 2014-09-09 15:15:03 +00:00
armada-375.c clk: mvebu: armada-375: Fix the description of the SAR in the comment 2014-09-09 15:15:22 +00:00
armada-xp.c clk: mvebu: armada-xp: maintain clock init order 2014-02-06 18:06:50 +00:00
clk-corediv.c clk: mvebu: Support Armada 380 SoC on the core divider clock 2014-03-13 23:24:23 +00:00
clk-cpu.c clk: mvebu: extend clk-cpu for dynamic frequency scaling 2014-07-16 12:58:38 +00:00
common.c clk: mvebu: add suspend/resume for gatable clocks 2014-11-30 16:40:12 +00:00
common.h clock mvebu changes for v3.18 (round 2) 2014-10-03 16:43:02 -07:00
dove.c clk: mvebu: dove: maintain clock init order 2014-02-06 18:06:52 +00:00
kirkwood.c cpufreq: kirkwood: use the powersave multiplexer 2014-09-02 15:02:54 -07:00
orion.c clk: mvebu: add Orion5x clock driver 2014-04-26 01:03:55 +00:00