summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2012-01-25 15:23:25 -0800
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-01-31 04:40:06 -0800
commit0bd4446fc7dac4d4a083706b3f411f2926bc8e9f (patch)
tree3d3da9af50e6f735efa35c72842c9cb592e2f18c /arch
parentd8c04668f8289df0218d34bc386c4e96fc795fd0 (diff)
ARM: tegra: power: Set awake system CPU rate floor
Set CPU rate floor to 100MHz when the system is awake (after boot, or on late resume). Remove the floor when the system enters early suspend. Bug 922351 Reviewed-on: http://git-master/r/77444 Change-Id: I68f54a3d981c1cbeac16d58d3beb6e3aa6bf190c Signed-off-by: Alex Frid <afrid@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/78031 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/pm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index 803ce0762fcf..61a93eead6da 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -42,6 +42,7 @@
#include <linux/vmalloc.h>
#include <linux/memblock.h>
#include <linux/console.h>
+#include <linux/pm_qos_params.h>
#include <asm/cacheflush.h>
#include <asm/cpu_pm.h>
@@ -168,6 +169,9 @@ struct suspend_context tegra_sctx;
#define MC_SECURITY_SIZE 0x70
#define MC_SECURITY_CFG2 0x7c
+#define AWAKE_CPU_FREQ_MIN 100000
+static struct pm_qos_request_list awake_cpu_freq_req;
+
struct dvfs_rail *tegra_cpu_rail;
static struct dvfs_rail *tegra_core_rail;
static struct clk *tegra_pclk;
@@ -1021,6 +1025,9 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat)
tegra_cpu_rail = tegra_dvfs_get_rail_by_name("vdd_cpu");
tegra_core_rail = tegra_dvfs_get_rail_by_name("vdd_core");
+ pm_qos_add_request(&awake_cpu_freq_req, PM_QOS_CPU_FREQ_MIN,
+ AWAKE_CPU_FREQ_MIN);
+
tegra_pclk = clk_get_sys(NULL, "pclk");
BUG_ON(IS_ERR(tegra_pclk));
pdata = plat;
@@ -1266,12 +1273,14 @@ static void pm_early_suspend(struct early_suspend *h)
{
if (clk_wake)
clk_disable(clk_wake);
+ pm_qos_update_request(&awake_cpu_freq_req, PM_QOS_DEFAULT_VALUE);
}
static void pm_late_resume(struct early_suspend *h)
{
if (clk_wake)
clk_enable(clk_wake);
+ pm_qos_update_request(&awake_cpu_freq_req, (s32)AWAKE_CPU_FREQ_MIN);
}
static struct early_suspend pm_early_suspender = {