summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/cpuquiet.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/cpuquiet.c')
-rw-r--r--arch/arm/mach-tegra/cpuquiet.c12
1 files changed, 11 insertions, 1 deletions
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);