All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tero Kristo <tero.kristo@nokia.com>
To: linux-omap@vger.kernel.org
Subject: [PATCHv4 5/8] OMAP3: PM: Removed pwrdm state hacking from omap_sram_idle
Date: Fri, 22 Jan 2010 19:55:48 +0200	[thread overview]
Message-ID: <1264182951-9205-6-git-send-email-tero.kristo@nokia.com> (raw)
In-Reply-To: <1264182951-9205-5-git-send-email-tero.kristo@nokia.com>

From: Tero Kristo <tero.kristo@nokia.com>

Following hacks will be moved inside cpuidle in subsequent patch:

- CAM domain prevents idle completely
- PER should not go OFF if core remains active

This simplifies the design and allows cpuidle to keep better track of which
power states system will actually enter.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
---
 arch/arm/mach-omap2/pm34xx.c |   18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index dceb18f..f7bb5c7 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -93,7 +93,6 @@ static int (*_omap_save_secure_sram)(u32 *addr);
 
 static struct powerdomain *mpu_pwrdm, *neon_pwrdm;
 static struct powerdomain *core_pwrdm, *per_pwrdm;
-static struct powerdomain *cam_pwrdm;
 
 static struct prm_setup_vc prm_setup = {
 	.clksetup = 0xff,
@@ -373,7 +372,6 @@ void omap_sram_idle(void)
 	int core_next_state = PWRDM_POWER_ON;
 	int core_prev_state, per_prev_state;
 	u32 sdrc_pwr = 0;
-	int per_state_modified = 0;
 
 	if (!_omap_sram_idle)
 		return;
@@ -411,20 +409,11 @@ void omap_sram_idle(void)
 	core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
 	if (per_next_state < PWRDM_POWER_ON) {
 		omap2_gpio_prepare_for_idle(per_next_state);
-		if (per_next_state == PWRDM_POWER_OFF) {
-			if (core_next_state == PWRDM_POWER_ON) {
-				per_next_state = PWRDM_POWER_RET;
-				pwrdm_set_next_pwrst(per_pwrdm, per_next_state);
-				per_state_modified = 1;
-			} else
-				omap3_per_save_context();
-		}
+		if (per_next_state == PWRDM_POWER_OFF)
+			omap3_per_save_context();
 		omap_uart_prepare_idle(2);
 	}
 
-	if (pwrdm_read_pwrst(cam_pwrdm) == PWRDM_POWER_ON)
-		omap2_clkdm_deny_idle(mpu_pwrdm->pwrdm_clkdms[0]);
-
 	/*
 	 * Disable smartreflex before entering WFI.
 	 * Only needed if we are going to enter retention or off.
@@ -554,8 +543,6 @@ void omap_sram_idle(void)
 		}
 		omap2_gpio_resume_after_idle();
 		omap_uart_resume_idle(2);
-		if (per_state_modified)
-			pwrdm_set_next_pwrst(per_pwrdm, PWRDM_POWER_OFF);
 	}
 
 	/* Disable IO-PAD and IO-CHAIN wakeup */
@@ -1175,7 +1162,6 @@ static int __init omap3_pm_init(void)
 	neon_pwrdm = pwrdm_lookup("neon_pwrdm");
 	per_pwrdm = pwrdm_lookup("per_pwrdm");
 	core_pwrdm = pwrdm_lookup("core_pwrdm");
-	cam_pwrdm = pwrdm_lookup("cam_pwrdm");
 
 	omap_push_sram_idle();
 #ifdef CONFIG_SUSPEND
-- 
1.5.4.3


  reply	other threads:[~2010-01-22 16:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-22 17:55 [PATCHv4 0/8] Idle status patches revisited Tero Kristo
2010-01-22 17:55 ` [PATCHv4 1/8] OMAP3: Clockdomain: Added API for checking if HWSUP is enabled Tero Kristo
2010-01-22 17:55   ` [PATCHv4 2/8] OMAP: Powerdomains: Add support for INACTIVE state on pwrdm level Tero Kristo
2010-01-22 17:55     ` [PATCHv4 3/8] OMAP3: PM: Added support for INACTIVE and ON states for powerdomains Tero Kristo
2010-01-22 17:55       ` [PATCHv4 4/8] OMAP3: CPUidle: Fixed support for ON / INACTIVE states Tero Kristo
2010-01-22 17:55         ` Tero Kristo [this message]
2010-01-22 17:55           ` [PATCHv4 6/8] OMAP3: Clock: Added IDLEST definitions for SGX Tero Kristo
2010-01-22 17:55             ` [PATCHv4 7/8] OMAP: Powerdomains: Add support for checking if pwrdm/clkdm can idle Tero Kristo
2010-01-22 17:55               ` [PATCHv4 8/8] OMAP3: CPUidle: Added peripheral pwrdm checks into bm check Tero Kristo
2010-02-01 22:02             ` [PATCHv4 6/8] OMAP3: Clock: Added IDLEST definitions for SGX Paul Walmsley
2010-02-02  8:03     ` [PATCHv4 2/8] OMAP: Powerdomains: Add support for INACTIVE state on pwrdm level Paul Walmsley
2010-02-02  9:26       ` Tero.Kristo
2010-02-01 22:10   ` [PATCHv4 1/8] OMAP3: Clockdomain: Added API for checking if HWSUP is enabled Paul Walmsley
2010-02-02  8:39     ` Tero.Kristo

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=1264182951-9205-6-git-send-email-tero.kristo@nokia.com \
    --to=tero.kristo@nokia.com \
    --cc=linux-omap@vger.kernel.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 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.