All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajendra Nayak <rnayak@ti.com>
To: linux-omap@vger.kernel.org
Cc: paul@pwsan.com, b-cousson@ti.com, khilman@ti.com,
	santosh.shilimkar@ti.com, linux-arm-kernel@lists.infradead.org,
	Rajendra Nayak <rnayak@ti.com>
Subject: [PATCH 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot
Date: Tue,  8 Feb 2011 15:40:36 +0530	[thread overview]
Message-ID: <1297159838-30282-6-git-send-email-rnayak@ti.com> (raw)
In-Reply-To: <1297159838-30282-5-git-send-email-rnayak@ti.com>

Enable all dpll autoidle for OMAP4 and OMAP3 (OMAP3
already had dpll autoidle turned on, but was done
using low level cm accessor apis).
On OMAP3, replace the cm accessor apis doing this
with the now available support for doing this in
clock framework, using omap_clk_enable_autoidle().

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/mach-omap2/pm34xx.c |   18 ++++--------------
 arch/arm/mach-omap2/pm44xx.c |    4 ++++
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2f864e4..5a101fa 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -38,6 +38,7 @@
 #include <plat/prcm.h>
 #include <plat/gpmc.h>
 #include <plat/dma.h>
+#include <plat/clock.h>
 
 #include <asm/tlbflush.h>
 
@@ -814,21 +815,10 @@ 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
+	 * Set all plls to autoidle.
+	 * TODO: Add all the iclk autoidles in here as well.
 	 */
-	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);
+	omap_clk_enable_autoidle();
 
 	/*
 	 * Enable control of expternal oscillator through
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 76cfff2..8431d41 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -15,6 +15,7 @@
 #include <linux/list.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <plat/clock.h>
 
 #include "powerdomain.h"
 #include <mach/omap4-common.h>
@@ -111,6 +112,9 @@ static int __init omap4_pm_init(void)
 		pr_err("Failed to setup powerdomains\n");
 		goto err2;
 	}
+
+	/* Enable autoidle for all clks which support it*/
+	omap_clk_enable_autoidle();
 #endif
 
 #ifdef CONFIG_SUSPEND
-- 
1.7.0.4


WARNING: multiple messages have this Message-ID (diff)
From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot
Date: Tue,  8 Feb 2011 15:40:36 +0530	[thread overview]
Message-ID: <1297159838-30282-6-git-send-email-rnayak@ti.com> (raw)
In-Reply-To: <1297159838-30282-5-git-send-email-rnayak@ti.com>

Enable all dpll autoidle for OMAP4 and OMAP3 (OMAP3
already had dpll autoidle turned on, but was done
using low level cm accessor apis).
On OMAP3, replace the cm accessor apis doing this
with the now available support for doing this in
clock framework, using omap_clk_enable_autoidle().

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/mach-omap2/pm34xx.c |   18 ++++--------------
 arch/arm/mach-omap2/pm44xx.c |    4 ++++
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2f864e4..5a101fa 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -38,6 +38,7 @@
 #include <plat/prcm.h>
 #include <plat/gpmc.h>
 #include <plat/dma.h>
+#include <plat/clock.h>
 
 #include <asm/tlbflush.h>
 
@@ -814,21 +815,10 @@ 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
+	 * Set all plls to autoidle.
+	 * TODO: Add all the iclk autoidles in here as well.
 	 */
-	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);
+	omap_clk_enable_autoidle();
 
 	/*
 	 * Enable control of expternal oscillator through
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 76cfff2..8431d41 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -15,6 +15,7 @@
 #include <linux/list.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <plat/clock.h>
 
 #include "powerdomain.h"
 #include <mach/omap4-common.h>
@@ -111,6 +112,9 @@ static int __init omap4_pm_init(void)
 		pr_err("Failed to setup powerdomains\n");
 		goto err2;
 	}
+
+	/* Enable autoidle for all clks which support it*/
+	omap_clk_enable_autoidle();
 #endif
 
 #ifdef CONFIG_SUSPEND
-- 
1.7.0.4

  reply	other threads:[~2011-02-08 10:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 10:10 [PATCH 0/7] clock/dpll autoidle support Rajendra Nayak
2011-02-08 10:10 ` Rajendra Nayak
2011-02-08 10:10 ` [PATCH 1/7] omap: clock: Check for enable/disable ops support Rajendra Nayak
2011-02-08 10:10   ` Rajendra Nayak
2011-02-08 10:10   ` [PATCH 2/7] omap3: dpll: Populate clkops for dpll1_ck Rajendra Nayak
2011-02-08 10:10     ` Rajendra Nayak
2011-02-08 10:10     ` [PATCH 3/7] omap: clock: Add allow_idle/deny_idle support in clkops Rajendra Nayak
2011-02-08 10:10       ` Rajendra Nayak
2011-02-08 10:10       ` [PATCH 4/7] omap: dpll: Add allow_idle/deny_idle support for all DPLL's Rajendra Nayak
2011-02-08 10:10         ` Rajendra Nayak
2011-02-08 10:10         ` Rajendra Nayak [this message]
2011-02-08 10:10           ` [PATCH 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot Rajendra Nayak
2011-02-08 10:10           ` [PATCH 6/7] omap4: dpll: Add dpll api to control GATE_CTRL Rajendra Nayak
2011-02-08 10:10             ` Rajendra Nayak
2011-02-08 10:10             ` [PATCH 7/7] omap4: dpll: Enable auto gate control for all MX postdividers Rajendra Nayak
2011-02-08 10:10               ` Rajendra Nayak
2011-02-12 23:18     ` [PATCH 2/7] omap3: dpll: Populate clkops for dpll1_ck Paul Walmsley
2011-02-12 23:18       ` Paul Walmsley
2011-02-12 23:17   ` [PATCH 1/7] omap: clock: Check for enable/disable ops support Paul Walmsley
2011-02-12 23:17     ` Paul Walmsley
2011-02-14 12:15     ` Rajendra Nayak
2011-02-14 12:15       ` Rajendra Nayak
2011-02-14 16:49       ` Paul Walmsley
2011-02-14 16:49         ` Paul Walmsley
2011-02-10  8:59 ` [PATCH 0/7] clock/dpll autoidle support Rajendra Nayak
2011-02-10  8:59   ` Rajendra Nayak

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=1297159838-30282-6-git-send-email-rnayak@ti.com \
    --to=rnayak@ti.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.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.