summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2011-05-12 21:08:34 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:13 -0800
commit8144175c1371bf2f218b20c101522b5b82fe7e79 (patch)
treeccc0c966867df42e0cf973c16dbd221606e563dc /arch/arm/mach-tegra
parent10c5b4ab503ca1ef440e94d46f4b549dd9e649a8 (diff)
ARM: tegra: power: Idle Tegra3 auto-hoplug on suspend entry
Original-Change-Id: I7f4fb6447c882a54d95ee3fb4c6149f4e0357d69 Reviewed-on: http://git-master/r/31457 Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Tested-by: Diwakar Tundlam <dtundlam@nvidia.com> Tested-by: Gerrit_Virtual_Submit Rebase-Id: Rbe2ac5f11065109d34a04793f93c873441e261be
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/cpu-tegra.c4
-rw-r--r--arch/arm/mach-tegra/cpu-tegra3.c7
-rw-r--r--arch/arm/mach-tegra/pm.h5
3 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c
index 2680a304f079..8280d7e9e76b 100644
--- a/arch/arm/mach-tegra/cpu-tegra.c
+++ b/arch/arm/mach-tegra/cpu-tegra.c
@@ -480,7 +480,7 @@ static int tegra_target(struct cpufreq_policy *policy,
target_cpu_speed[policy->cpu] = freq;
ret = tegra_cpu_cap_highest_speed(&new_speed);
if (ret == 0)
- tegra_auto_hotplug_governor(new_speed);
+ tegra_auto_hotplug_governor(new_speed, false);
out:
mutex_unlock(&tegra_cpu_lock);
@@ -497,6 +497,8 @@ static int tegra_pm_notify(struct notifier_block *nb, unsigned long event,
pr_info("Tegra cpufreq suspend: setting frequency to %d kHz\n",
freq_table[suspend_index].frequency);
tegra_update_cpu_speed(freq_table[suspend_index].frequency);
+ tegra_auto_hotplug_governor(
+ freq_table[suspend_index].frequency, true);
} else if (event == PM_POST_SUSPEND) {
is_suspended = false;
tegra_cpu_edp_init(true);
diff --git a/arch/arm/mach-tegra/cpu-tegra3.c b/arch/arm/mach-tegra/cpu-tegra3.c
index 84ddc4ffb626..2ec00511ccbc 100644
--- a/arch/arm/mach-tegra/cpu-tegra3.c
+++ b/arch/arm/mach-tegra/cpu-tegra3.c
@@ -271,13 +271,18 @@ static void tegra_auto_hotplug_work_func(struct work_struct *work)
}
}
-void tegra_auto_hotplug_governor(unsigned int cpu_freq)
+void tegra_auto_hotplug_governor(unsigned int cpu_freq, bool suspend)
{
unsigned long up_delay;
if (!is_g_cluster_present())
return;
+ if (suspend && (hp_state != TEGRA_HP_DISABLED)) {
+ hp_state = TEGRA_HP_IDLE;
+ return;
+ }
+
up_delay = is_lp_cluster() ? up2g0_delay : up2gn_delay;
switch (hp_state) {
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index f730e8aa95b6..87f248efa3ea 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -76,13 +76,14 @@ int tegra_cpu_cap_highest_speed(unsigned int *speed_cap);
#if defined(CONFIG_TEGRA_AUTO_HOTPLUG) && !defined(CONFIG_ARCH_TEGRA_2x_SOC)
int tegra_auto_hotplug_init(struct mutex *cpu_lock);
void tegra_auto_hotplug_exit(void);
-void tegra_auto_hotplug_governor(unsigned int cpu_freq);
+void tegra_auto_hotplug_governor(unsigned int cpu_freq, bool suspend);
#else
static inline int tegra_auto_hotplug_init(struct mutex *cpu_lock)
{ return 0; }
static inline void tegra_auto_hotplug_exit(void)
{ }
-static inline void tegra_auto_hotplug_governor(unsigned int cpu_freq)
+static inline void tegra_auto_hotplug_governor(unsigned int cpu_freq,
+ bool suspend)
{ }
#endif