All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: "Benoît Cousson" <bcousson@baylibre.com>,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Tero Kristo" <t-kristo@ti.com>,
	"Dave Gerlach" <d-gerlach@ti.com>,
	"Santosh Shilimkar" <ssantosh@kernel.org>,
	"Suman Anna" <s-anna@ti.com>
Subject: [PATCH 01/17] clk: ti: am437x: Keep am4 l3 main clock always on for genpd
Date: Mon, 16 Nov 2020 13:19:23 +0200	[thread overview]
Message-ID: <20201116111939.21405-2-tony@atomide.com> (raw)
In-Reply-To: <20201116111939.21405-1-tony@atomide.com>

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(+)

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();
 
 	/*
-- 
2.29.2

  reply	other threads:[~2020-11-16 12:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 11:19 [PATCH 00/17] Update am437x to boot with simple-pm-bus and genpd Tony Lindgren
2020-11-16 11:19 ` Tony Lindgren [this message]
2020-12-09  2:19   ` [PATCH 01/17] clk: ti: am437x: Keep am4 l3 main clock always on for genpd Stephen Boyd
2020-11-16 11:19 ` [PATCH 02/17] soc: ti: omap-prm: am4: add genpd support for remaining PRM instances Tony Lindgren
2020-11-16 11:19 ` [PATCH 03/17] ARM: dts: am43xx: add " Tony Lindgren
2020-11-16 11:19 ` [PATCH 04/17] ARM: dts: Configure also interconnect clocks for am4 system timer Tony Lindgren
2020-11-16 11:19 ` [PATCH 05/17] ARM: OMAP2+: Drop legacy platform data for am4 control module Tony Lindgren
2020-11-16 11:19 ` [PATCH 06/17] ARM: dts: Configure RTC powerdomain for am4 Tony Lindgren
2020-11-16 11:19 ` [PATCH 07/17] ARM: dts: Configure interconnect target module for am4 wkup_m3 Tony Lindgren
2020-11-16 11:19 ` [PATCH 08/17] ARM: OMAP2+: Drop legacy platform data " Tony Lindgren
2020-11-16 11:19 ` [PATCH 09/17] ARM: OMAP2+: Drop legacy platform data for am4 emif Tony Lindgren
2020-11-16 11:19 ` [PATCH 10/17] ARM: OMAP2+: Drop legacy platform data for am4 ocmcram Tony Lindgren
2020-11-16 11:19 ` [PATCH 11/17] ARM: OMAP2+: Drop legacy platform data for am4 mpuss Tony Lindgren
2020-11-16 11:19 ` [PATCH 12/17] ARM: dts: Use simple-pm-bus for genpd for am4 l4_wkup Tony Lindgren
2020-11-16 11:19 ` [PATCH 13/17] ARM: dts: Use simple-pm-bus for genpd for am4 l4_fast Tony Lindgren
2020-11-16 11:19 ` [PATCH 14/17] ARM: dts: Use simple-pm-bus for genpd for am4 l4_per Tony Lindgren
2020-11-16 11:19 ` [PATCH 15/17] ARM: dts: Move am4 l3 noc to a separate node Tony Lindgren
2020-11-16 11:19 ` [PATCH 16/17] ARM: dts: Use simple-pm-bus for genpd for am4 l3 Tony Lindgren
2020-11-16 11:19 ` [PATCH 17/17] ARM: OMAP2+: Drop legacy remaining legacy platform data for am4 Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201116111939.21405-2-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=bcousson@baylibre.com \
    --cc=d-gerlach@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=s-anna@ti.com \
    --cc=sboyd@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=t-kristo@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.