diff options
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/cpu-tegra3.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/cpuquiet.c | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/cpu-tegra3.c b/arch/arm/mach-tegra/cpu-tegra3.c index ec63622b4705..c0d21bfa816a 100644 --- a/arch/arm/mach-tegra/cpu-tegra3.c +++ b/arch/arm/mach-tegra/cpu-tegra3.c @@ -360,7 +360,7 @@ static int min_cpus_notify(struct notifier_block *nb, unsigned long n, void *p) { mutex_lock(tegra3_cpu_lock); - if ((n >= 1) && is_lp_cluster()) { + if ((n >= 1) && is_lp_cluster() && !no_lp) { /* make sure cpu rate is within g-mode range before switching */ unsigned int speed = max((unsigned long)tegra_getspeed(0), clk_get_min_rate(cpu_g_clk) / 1000); diff --git a/arch/arm/mach-tegra/cpuquiet.c b/arch/arm/mach-tegra/cpuquiet.c index ed197b1e6c6f..87aebfe7badb 100644 --- a/arch/arm/mach-tegra/cpuquiet.c +++ b/arch/arm/mach-tegra/cpuquiet.c @@ -188,6 +188,9 @@ static void min_max_constraints_workfunc(struct work_struct *work) int max_cpus = pm_qos_request(PM_QOS_MAX_ONLINE_CPUS) ? : 4; int min_cpus = pm_qos_request(PM_QOS_MIN_ONLINE_CPUS); + if (cpq_state == TEGRA_CPQ_DISABLED) + return; + if (is_lp_cluster()) return; @@ -219,10 +222,14 @@ static int min_cpus_notify(struct notifier_block *nb, unsigned long n, void *p) { bool g_cluster = false; + if (cpq_state == TEGRA_CPQ_DISABLED) + return NOTIFY_OK; + mutex_lock(tegra3_cpu_lock); if ((n >= 1) && is_lp_cluster()) { - /* make sure cpu rate is within g-mode range before switching */ + /* make sure cpu rate is within g-mode + * range before switching */ unsigned long speed = max((unsigned long)tegra_getspeed(0), clk_get_min_rate(cpu_g_clk) / 1000); tegra_update_cpu_speed(speed); @@ -244,6 +251,9 @@ static int min_cpus_notify(struct notifier_block *nb, unsigned long n, void *p) static int max_cpus_notify(struct notifier_block *nb, unsigned long n, void *p) { + if (cpq_state == TEGRA_CPQ_DISABLED) + return NOTIFY_OK; + if (n < num_online_cpus()) schedule_work(&minmax_work); |