linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/11] OMAP2+: clock: disable autoidle on all clocks during clock init
Date: Tue, 15 Feb 2011 23:52:43 -0700	[thread overview]
Message-ID: <20110216065239.22089.24784.stgit@twilight.localdomain> (raw)
In-Reply-To: <20110216065030.22089.61217.stgit@twilight.localdomain>

Disable autoidle on all clocks during clock framework initialization.
(If CONFIG_PM is set, autoidle is re-enabled for all clocks later in
the boot process.)

The principle behind this patch, and some similar patches, is that the
kernel should start with all power management features disabled.
Later in the boot process, the PM code, if compiled in with CONFIG_PM,
enables or re-enables power management features.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/clock2420_data.c |    3 +++
 arch/arm/mach-omap2/clock2430_data.c |    3 +++
 arch/arm/mach-omap2/clock3xxx.c      |    3 ---
 arch/arm/mach-omap2/clock3xxx_data.c |    6 +++++-
 arch/arm/mach-omap2/clock44xx_data.c |    3 +++
 5 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index 0a992bc..ee73e14 100644
--- a/arch/arm/mach-omap2/clock2420_data.c
+++ b/arch/arm/mach-omap2/clock2420_data.c
@@ -1913,6 +1913,9 @@ int __init omap2420_clk_init(void)
 		omap2_init_clk_clkdm(c->lk.clk);
 	}
 
+	/* Disable autoidle on all clocks; let the PM code enable it later */
+	omap_clk_disable_autoidle_all();
+
 	/* Check the MPU rate set by bootloader */
 	clkrate = omap2xxx_clk_get_core_rate(&dpll_ck);
 	for (prcm = rate_table; prcm->mpu_speed; prcm++) {
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
index c047dcd..a1298e5 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -2028,6 +2028,9 @@ int __init omap2430_clk_init(void)
 		omap2_init_clk_clkdm(c->lk.clk);
 	}
 
+	/* Disable autoidle on all clocks; let the PM code enable it later */
+	omap_clk_disable_autoidle_all();
+
 	/* Check the MPU rate set by bootloader */
 	clkrate = omap2xxx_clk_get_core_rate(&dpll_ck);
 	for (prcm = rate_table; prcm->mpu_speed; prcm++) {
diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c
index e9f66b6..952c3e0 100644
--- a/arch/arm/mach-omap2/clock3xxx.c
+++ b/arch/arm/mach-omap2/clock3xxx.c
@@ -65,9 +65,6 @@ void __init omap3_clk_lock_dpll5(void)
 	clk_set_rate(dpll5_clk, DPLL5_FREQ_FOR_USBHOST);
 	clk_enable(dpll5_clk);
 
-	/* Enable autoidle to allow it to enter low power bypass */
-	omap3_dpll_allow_idle(dpll5_clk);
-
 	/* Program dpll5_m2_clk divider for no division */
 	dpll5_m2_clk = clk_get(NULL, "dpll5_m2_ck");
 	clk_enable(dpll5_m2_clk);
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 7cf89f8..0021559 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3535,6 +3535,9 @@ int __init omap3xxx_clk_init(void)
 			omap2_init_clk_clkdm(c->lk.clk);
 		}
 
+	/* Disable autoidle on all clocks; let the PM code enable it later */
+	omap_clk_disable_autoidle_all();
+
 	recalculate_root_clocks();
 
 	pr_info("Clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n",
@@ -3548,7 +3551,8 @@ int __init omap3xxx_clk_init(void)
 	clk_enable_init_clocks();
 
 	/*
-	 * Lock DPLL5 and put it in autoidle.
+	 * Lock DPLL5 -- here only until other device init code can
+	 * handle this
 	 */
 	if (omap_rev() >= OMAP3430_REV_ES2_0)
 		omap3_clk_lock_dpll5();
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index dcbe105..2795342 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3309,6 +3309,9 @@ int __init omap4xxx_clk_init(void)
 			omap2_init_clk_clkdm(c->lk.clk);
 		}
 
+	/* Disable autoidle on all clocks; let the PM code enable it later */
+	omap_clk_disable_autoidle_all();
+
 	recalculate_root_clocks();
 
 	/*

  reply	other threads:[~2011-02-16  6:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-16  6:52 [PATCH 00/11] OMAP2+: clock: add clockfw autoidle for iclks, OMAP2xxx Paul Walmsley
2011-02-16  6:52 ` Paul Walmsley [this message]
2011-02-16  6:52 ` [PATCH 02/11] OMAP2: clock: add DPLL autoidle support Paul Walmsley
2011-02-16  6:52 ` [PATCH 03/11] OMAP2xxx: clock: add clockfw autoidle support for APLLs Paul Walmsley
2011-02-16  6:52 ` [PATCH 04/11] OMAP2+: clock: comment that osc_ck/osc_sys_ck should use clockfw autoidle control Paul Walmsley
2011-02-16  6:52 ` [PATCH 05/11] OMAP2+: clock: add interface clock type code with autoidle support Paul Walmsley
2011-02-16  6:52 ` [PATCH 06/11] OMAP2420: clock: add sdrc_ick Paul Walmsley
2011-02-16  6:52 ` [PATCH 07/11] OMAP2420: clock: use autoidle clkops for all autoidle-controllable interface clocks Paul Walmsley
2011-02-16  6:52 ` [PATCH 08/11] OMAP2430/3xxx: clock: add modem clock autoidle support Paul Walmsley
2011-02-16  6:52 ` [PATCH 09/11] OMAP2430: clock: use autoidle clkops for all autoidle-controllable interface clocks Paul Walmsley
2011-02-16  6:52 ` [PATCH 10/11] OMAP3: " Paul Walmsley
2011-02-16  6:52 ` [PATCH 11/11] OMAP2/3: PM: remove manual CM_AUTOIDLE bit setting in mach-omap2/pm*xx.c Paul Walmsley
2011-02-16  9:37 ` [PATCH 00/11] OMAP2+: clock: add clockfw autoidle for iclks, OMAP2xxx Rajendra Nayak
2011-02-16 22:14   ` Paul Walmsley
2011-02-18  5:33     ` Rajendra Nayak
2011-02-16 11:15 ` Rajendra Nayak
2011-02-16 23:05   ` Paul Walmsley
2011-02-18  5:35     ` Rajendra Nayak
2011-03-01 20:58 ` Kevin Hilman
2011-03-08  3:06   ` Paul Walmsley

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=20110216065239.22089.24784.stgit@twilight.localdomain \
    --to=paul@pwsan.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).