mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
![Geert Uytterhoeven](/assets/img/avatar_default.png)
On R-Car Gen3 systems, PSCI system suspend powers down the SoC, possibly losing clock configuration. Hence add a notifier chain that can be used by core clocks to save/restore clock state during system suspend/resume. The implementation of the actual clock state save/restore operations is clock-specific, and to be registered with the notifier chain in the SoC or family-specific cpg_mssr_info.cpg_clk_register() callback. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
43 lines
1.2 KiB
C
43 lines
1.2 KiB
C
/*
|
|
* R-Car Gen2 Clock Pulse Generator
|
|
*
|
|
* Copyright (C) 2016 Cogent Embedded Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2 as published
|
|
* by the Free Software Foundation; version 2 of the License.
|
|
*/
|
|
|
|
#ifndef __CLK_RENESAS_RCAR_GEN2_CPG_H__
|
|
#define __CLK_RENESAS_RCAR_GEN2_CPG_H__
|
|
|
|
enum rcar_gen2_clk_types {
|
|
CLK_TYPE_GEN2_MAIN = CLK_TYPE_CUSTOM,
|
|
CLK_TYPE_GEN2_PLL0,
|
|
CLK_TYPE_GEN2_PLL1,
|
|
CLK_TYPE_GEN2_PLL3,
|
|
CLK_TYPE_GEN2_Z,
|
|
CLK_TYPE_GEN2_LB,
|
|
CLK_TYPE_GEN2_ADSP,
|
|
CLK_TYPE_GEN2_SDH,
|
|
CLK_TYPE_GEN2_SD0,
|
|
CLK_TYPE_GEN2_SD1,
|
|
CLK_TYPE_GEN2_QSPI,
|
|
CLK_TYPE_GEN2_RCAN,
|
|
};
|
|
|
|
struct rcar_gen2_cpg_pll_config {
|
|
unsigned int extal_div;
|
|
unsigned int pll1_mult;
|
|
unsigned int pll3_mult;
|
|
unsigned int pll0_mult; /* leave as zero if PLL0CR exists */
|
|
};
|
|
|
|
struct clk *rcar_gen2_cpg_clk_register(struct device *dev,
|
|
const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
|
|
struct clk **clks, void __iomem *base,
|
|
struct raw_notifier_head *notifiers);
|
|
int rcar_gen2_cpg_init(const struct rcar_gen2_cpg_pll_config *config,
|
|
unsigned int pll0_div, u32 mode);
|
|
|
|
#endif
|