diff mbox series

[01/17] clk: ti: am437x: Keep am4 l3 main clock always on for genpd

Message ID 20201116111939.21405-2-tony@atomide.com (mailing list archive)
State New, archived
Headers show
Series Update am437x to boot with simple-pm-bus and genpd | expand

Commit Message

Tony Lindgren Nov. 16, 2020, 11:19 a.m. UTC
In order for suspend and resume to work with genpd on am4, we must keep
l3 main clock always on. Otherwise prm_omap driver will shut down the l3
main clock on suspend when simple-pm-bus and GENPD_FLAG_PM_CLK are used.
Note that we already keep the l3 main clock always on with the legacy
platform code.

Later on we may want to start managing the l3 main clock with a dedicated
interconnect driver instead of using simple-pm-bus and GENPD_FLAG_PM_CLK.

Cc: linux-clk@vger.kernel.org
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/clk/ti/clk-43xx.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Stephen Boyd Dec. 9, 2020, 2:19 a.m. UTC | #1
Quoting Tony Lindgren (2020-11-16 03:19:23)
> In order for suspend and resume to work with genpd on am4, we must keep
> l3 main clock always on. Otherwise prm_omap driver will shut down the l3
> main clock on suspend when simple-pm-bus and GENPD_FLAG_PM_CLK are used.
> Note that we already keep the l3 main clock always on with the legacy
> platform code.
> 
> Later on we may want to start managing the l3 main clock with a dedicated
> interconnect driver instead of using simple-pm-bus and GENPD_FLAG_PM_CLK.
> 
> Cc: linux-clk@vger.kernel.org
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>
diff mbox series

Patch

diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
--- a/drivers/clk/ti/clk-43xx.c
+++ b/drivers/clk/ti/clk-43xx.c
@@ -272,6 +272,11 @@  static struct ti_dt_clk am43xx_clks[] = {
 	{ .node_name = NULL },
 };
 
+static const char *enable_init_clks[] = {
+	/* AM4_L3_L3_MAIN_CLKCTRL, needed during suspend */
+	"l3-clkctrl:0000:0",
+};
+
 int __init am43xx_dt_clk_init(void)
 {
 	struct clk *clk1, *clk2;
@@ -283,6 +288,9 @@  int __init am43xx_dt_clk_init(void)
 
 	omap2_clk_disable_autoidle_all();
 
+	omap2_clk_enable_init_clocks(enable_init_clks,
+				     ARRAY_SIZE(enable_init_clks));
+
 	ti_clk_add_aliases();
 
 	/*