All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <paul@pwsan.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: linux-omap@vger.kernel.org, Benoit Cousson <b-cousson@ti.com>,
	Kevin Hilman <khilman@ti.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	linux-arm-kernel@lists.infradead.org
Subject: RE: [PATCH v2 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot
Date: Wed, 16 Feb 2011 15:37:26 -0700 (MST)	[thread overview]
Message-ID: <alpine.DEB.2.00.1102161531460.29817@utopia.booyaka.com> (raw)
In-Reply-To: <ee3e93f406daf1a283b8d551f57933e3@mail.gmail.com>


Hi

After Rajendra's E-mail here:

   http://marc.info/?l=linux-arm-kernel&m=129785498406128&w=2

upon looking further, mach-omap2/pm.c is compiled in for !CONFIG_PM.  
This will be dealt with in a separate patch, but in the meantime, I 
propose we enable clock autoidle if CONFIG_OMAP_RESET_CLOCKS is set.  
(Really this config option should be called CONFIG_OMAP_DONT_BREAK_CLOCKFW 
or CONFIG_OMAP_MAKE_POWER_MANAGEMENT_WORK, but all that, too, is a matter 
for another patch.)

Here's what I'm proposing to use as a replacement; comments welcome.  The 
clk_autoidle_a_2.6.39 branch has been updated accordingly.


- Paul

From: Paul Walmsley <paul@pwsan.com>
Date: Mon, 14 Feb 2011 09:39:11 -0700
Subject: [PATCH] OMAP2+: clock: autoidle as many clocks as possible if CONFIG_OMAP_RESET_CLOCKS

Attempt to enable autoidle for as many clocks as possible in the
OMAP2+-common CONFIG_OMAP_RESET_CLOCKS code.  Currently, this only
enables DPLL autoidle for OMAP3/4 DPLLs; but future patches will
enable autoidle for other clocks and the OMAP2 DPLL/APLLs.

In the long run, we should probably get rid of
CONFIG_OMAP_RESET_CLOCKS, and unconditionally run the code that it
selects.  Otherwise, the state of the clock tree won't match the
hardware state - this could result in clocks being enabled or disabled
unpredictably.

Based on a patch by Rajendra Nayak <rnayak@ti.com> that did this in
the pm34xx.c/pm44xx.c code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/mach-omap2/pm34xx.c |   17 -----------------
 arch/arm/plat-omap/clock.c   |    1 +
 2 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2f864e4..1fe2e73 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -814,23 +814,6 @@ static void __init prcm_setup_regs(void)
 	omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG);
 
 	/*
-	 * Set all plls to autoidle. This is needed until autoidle is
-	 * enabled by clockfw
-	 */
-	omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_IVA2_DPLL_SHIFT,
-			 OMAP3430_IVA2_MOD, CM_AUTOIDLE2);
-	omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_MPU_DPLL_SHIFT,
-			 MPU_MOD,
-			 CM_AUTOIDLE2);
-	omap2_cm_write_mod_reg((1 << OMAP3430_AUTO_PERIPH_DPLL_SHIFT) |
-			 (1 << OMAP3430_AUTO_CORE_DPLL_SHIFT),
-			 PLL_MOD,
-			 CM_AUTOIDLE);
-	omap2_cm_write_mod_reg(1 << OMAP3430ES2_AUTO_PERIPH2_DPLL_SHIFT,
-			 PLL_MOD,
-			 CM_AUTOIDLE2);
-
-	/*
 	 * Enable control of expternal oscillator through
 	 * sys_clkreq. In the long run clock framework should
 	 * take care of this.
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 0ae0eae..2770ddd 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -446,6 +446,7 @@ static int __init clk_disable_unused(void)
 	return 0;
 }
 late_initcall(clk_disable_unused);
+late_initcall(omap_clk_enable_autoidle_all);
 #endif
 
 int __init clk_init(struct clk_functions * custom_clocks)
-- 
1.7.2.3


WARNING: multiple messages have this Message-ID (diff)
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot
Date: Wed, 16 Feb 2011 15:37:26 -0700 (MST)	[thread overview]
Message-ID: <alpine.DEB.2.00.1102161531460.29817@utopia.booyaka.com> (raw)
In-Reply-To: <ee3e93f406daf1a283b8d551f57933e3@mail.gmail.com>


Hi

After Rajendra's E-mail here:

   http://marc.info/?l=linux-arm-kernel&m=129785498406128&w=2

upon looking further, mach-omap2/pm.c is compiled in for !CONFIG_PM.  
This will be dealt with in a separate patch, but in the meantime, I 
propose we enable clock autoidle if CONFIG_OMAP_RESET_CLOCKS is set.  
(Really this config option should be called CONFIG_OMAP_DONT_BREAK_CLOCKFW 
or CONFIG_OMAP_MAKE_POWER_MANAGEMENT_WORK, but all that, too, is a matter 
for another patch.)

Here's what I'm proposing to use as a replacement; comments welcome.  The 
clk_autoidle_a_2.6.39 branch has been updated accordingly.


- Paul

From: Paul Walmsley <paul@pwsan.com>
Date: Mon, 14 Feb 2011 09:39:11 -0700
Subject: [PATCH] OMAP2+: clock: autoidle as many clocks as possible if CONFIG_OMAP_RESET_CLOCKS

Attempt to enable autoidle for as many clocks as possible in the
OMAP2+-common CONFIG_OMAP_RESET_CLOCKS code.  Currently, this only
enables DPLL autoidle for OMAP3/4 DPLLs; but future patches will
enable autoidle for other clocks and the OMAP2 DPLL/APLLs.

In the long run, we should probably get rid of
CONFIG_OMAP_RESET_CLOCKS, and unconditionally run the code that it
selects.  Otherwise, the state of the clock tree won't match the
hardware state - this could result in clocks being enabled or disabled
unpredictably.

Based on a patch by Rajendra Nayak <rnayak@ti.com> that did this in
the pm34xx.c/pm44xx.c code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/mach-omap2/pm34xx.c |   17 -----------------
 arch/arm/plat-omap/clock.c   |    1 +
 2 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2f864e4..1fe2e73 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -814,23 +814,6 @@ static void __init prcm_setup_regs(void)
 	omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG);
 
 	/*
-	 * Set all plls to autoidle. This is needed until autoidle is
-	 * enabled by clockfw
-	 */
-	omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_IVA2_DPLL_SHIFT,
-			 OMAP3430_IVA2_MOD, CM_AUTOIDLE2);
-	omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_MPU_DPLL_SHIFT,
-			 MPU_MOD,
-			 CM_AUTOIDLE2);
-	omap2_cm_write_mod_reg((1 << OMAP3430_AUTO_PERIPH_DPLL_SHIFT) |
-			 (1 << OMAP3430_AUTO_CORE_DPLL_SHIFT),
-			 PLL_MOD,
-			 CM_AUTOIDLE);
-	omap2_cm_write_mod_reg(1 << OMAP3430ES2_AUTO_PERIPH2_DPLL_SHIFT,
-			 PLL_MOD,
-			 CM_AUTOIDLE2);
-
-	/*
 	 * Enable control of expternal oscillator through
 	 * sys_clkreq. In the long run clock framework should
 	 * take care of this.
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 0ae0eae..2770ddd 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -446,6 +446,7 @@ static int __init clk_disable_unused(void)
 	return 0;
 }
 late_initcall(clk_disable_unused);
+late_initcall(omap_clk_enable_autoidle_all);
 #endif
 
 int __init clk_init(struct clk_functions * custom_clocks)
-- 
1.7.2.3

  parent reply	other threads:[~2011-02-16 22:37 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10  9:16 [PATCH v2 0/7] clock/dpll autoidle support Rajendra Nayak
2011-02-10  9:16 ` Rajendra Nayak
2011-02-10  9:16 ` [PATCH v2 1/7] omap: clock: Check for enable/disable ops support Rajendra Nayak
2011-02-10  9:16   ` Rajendra Nayak
2011-02-10  9:16   ` [PATCH v2 2/7] omap3: dpll: Populate clkops for dpll1_ck Rajendra Nayak
2011-02-10  9:16     ` Rajendra Nayak
2011-02-10  9:16     ` [PATCH v2 3/7] omap: clock: Add allow_idle/deny_idle support in clkops Rajendra Nayak
2011-02-10  9:16       ` Rajendra Nayak
2011-02-10  9:16       ` [PATCH v2 4/7] omap: dpll: Add allow_idle/deny_idle support for all DPLL's Rajendra Nayak
2011-02-10  9:16         ` Rajendra Nayak
2011-02-10  9:16         ` [PATCH v2 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot Rajendra Nayak
2011-02-10  9:16           ` Rajendra Nayak
2011-02-10  9:16           ` [PATCH v2 6/7] omap4: dpll: Add dpll api to control GATE_CTRL Rajendra Nayak
2011-02-10  9:16             ` Rajendra Nayak
2011-02-10  9:16             ` [PATCH v2 7/7] omap4: dpll: Enable auto gate control for all MX postdividers Rajendra Nayak
2011-02-10  9:16               ` Rajendra Nayak
2011-02-13  1:10               ` Paul Walmsley
2011-02-13  1:10                 ` Paul Walmsley
2011-02-14 12:34                 ` Rajendra Nayak
2011-02-14 12:34                   ` Rajendra Nayak
2011-02-13  1:08             ` [PATCH v2 6/7] omap4: dpll: Add dpll api to control GATE_CTRL Paul Walmsley
2011-02-13  1:08               ` Paul Walmsley
2011-02-13  0:42           ` [PATCH v2 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot Paul Walmsley
2011-02-13  0:42             ` Paul Walmsley
2011-02-14 12:32             ` Rajendra Nayak
2011-02-14 12:32               ` Rajendra Nayak
2011-02-14 16:52               ` Paul Walmsley
2011-02-14 16:52                 ` Paul Walmsley
2011-02-16 22:37               ` Paul Walmsley [this message]
2011-02-16 22:37                 ` Paul Walmsley
2011-02-13  0:28         ` [PATCH v2 4/7] omap: dpll: Add allow_idle/deny_idle support for all DPLL's Paul Walmsley
2011-02-13  0:28           ` Paul Walmsley
2011-02-14 12:29           ` Rajendra Nayak
2011-02-14 12:29             ` Rajendra Nayak
2011-02-14 16:51             ` Paul Walmsley
2011-02-14 16:51               ` Paul Walmsley
2011-02-13  0:04       ` [PATCH v2 3/7] omap: clock: Add allow_idle/deny_idle support in clkops Paul Walmsley
2011-02-13  0:04         ` Paul Walmsley
2011-02-13  0:25         ` Paul Walmsley
2011-02-13  0:25           ` Paul Walmsley
2011-02-14 12:23         ` Rajendra Nayak
2011-02-14 12:23           ` Rajendra Nayak
2011-02-14 16:50           ` Paul Walmsley
2011-02-14 16:50             ` Paul Walmsley
2011-02-13  1:17 ` [PATCH v2 0/7] clock/dpll autoidle support Paul Walmsley
2011-02-13  1:17   ` 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=alpine.DEB.2.00.1102161531460.29817@utopia.booyaka.com \
    --to=paul@pwsan.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rnayak@ti.com \
    --cc=santosh.shilimkar@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.