clk: renesas: div6: Restore clock state during resume

On R-Car Gen3 systems, PSCI system suspend powers down the SoC, losing
clock configuration.  Register an (optional) notifier to restore the
DIV6 clock state during system resume.

As DIV6 clocks can be picky w.r.t. modifying multiple register fields at
once, restore is not implemented by blindly restoring the register
value, but by using the existing cpg_div6_clock_{en,dis}able() helpers.

Note that this does not yet support DIV6 clocks with multiple parents,
which do not exist on R-Car Gen3 SoCs.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
此提交包含在:
Geert Uytterhoeven
2017-06-21 22:34:33 +02:00
父節點 1f4023cdd1
當前提交 9f8c71e513
共有 3 個檔案被更改,包括 40 行新增4 行删除

查看文件

@@ -2,6 +2,7 @@
#define __RENESAS_CLK_DIV6_H__
struct clk *cpg_div6_register(const char *name, unsigned int num_parents,
const char **parent_names, void __iomem *reg);
const char **parent_names, void __iomem *reg,
struct raw_notifier_head *notifiers);
#endif