From eb2490a6a4788d7ed4f3b9c978ce828155afffac Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Sat, 12 May 2012 00:16:31 -0700 Subject: ARM: tegra: power: Go to G-CPU if minimum 1 is requested On Tegra3 switch and stay on G-CPU if minimum 1 is requested via PM QoS interface. Allow return to LP-CPU only if request is at default 0 level. Change-Id: Ie1a732fe6c6a1dcd2f7e78be01e32dcc5a7993a6 Signed-off-by: Alex Frid Reviewed-on: http://git-master/r/102120 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Donghan Ryu Reviewed-by: Satya Popuri Reviewed-by: Diwakar Tundlam GVS: Gerrit_Virtual_Submit Reviewed-by: Yu-Huan Hsu --- arch/arm/mach-tegra/cpu-tegra3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-tegra/cpu-tegra3.c') diff --git a/arch/arm/mach-tegra/cpu-tegra3.c b/arch/arm/mach-tegra/cpu-tegra3.c index 86a0b1364b3d..fe2b6bbf1755 100644 --- a/arch/arm/mach-tegra/cpu-tegra3.c +++ b/arch/arm/mach-tegra/cpu-tegra3.c @@ -230,7 +230,8 @@ static void tegra_auto_hotplug_work_func(struct work_struct *work) cpu = tegra_get_slowest_cpu_n(); if (cpu < nr_cpu_ids) { up = false; - } else if (!is_lp_cluster() && !no_lp) { + } else if (!is_lp_cluster() && !no_lp && + !pm_qos_request(PM_QOS_MIN_ONLINE_CPUS)) { if(!clk_set_parent(cpu_clk, cpu_lp_clk)) { hp_stats_update(CONFIG_NR_CPUS, true); hp_stats_update(0, false); @@ -299,7 +300,7 @@ static int min_cpus_notify(struct notifier_block *nb, unsigned long n, void *p) { mutex_lock(tegra3_cpu_lock); - if ((n >= 2) && is_lp_cluster()) { + if ((n >= 1) && is_lp_cluster()) { /* make sure cpu rate is within g-mode range before switching */ unsigned int speed = max( tegra_getspeed(0), clk_get_min_rate(cpu_g_clk) / 1000); -- cgit v1.2.3