diff options
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/cpu-tegra.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/cpu-tegra3.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-tegra/pm.h | 5 |
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 |