summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>2012-03-02 15:27:51 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 10:59:33 +0200
commita64c302217531484e700f03fb6726b8a9fea34c3 (patch)
treefb5a881231ca48008077d7f95bb51134db1a9b9f /arch
parent7be2331868e098bdade6eb8ae9474e851ecd99e5 (diff)
arm: ux500: qos: remove locking down of ape opp during voice-call
ST-Ericsson Linux next: - ST-Ericsson ID: 419724 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I0abb64e24fd4eadd01335e1fddd56a1b05c94ce9 Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/51373 Reviewed-by: Mattias NILSSON <mattias.i.nilsson@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/pm/prcmu-qos-power.c39
-rw-r--r--arch/arm/mach-ux500/prcmu-debug.c3
2 files changed, 17 insertions, 25 deletions
diff --git a/arch/arm/mach-ux500/pm/prcmu-qos-power.c b/arch/arm/mach-ux500/pm/prcmu-qos-power.c
index a600a57dc13..3bd99b766af 100644
--- a/arch/arm/mach-ux500/pm/prcmu-qos-power.c
+++ b/arch/arm/mach-ux500/pm/prcmu-qos-power.c
@@ -117,7 +117,7 @@ static struct prcmu_qos_object *prcmu_qos_array[] = {
static DEFINE_MUTEX(prcmu_qos_mutex);
static DEFINE_SPINLOCK(prcmu_qos_lock);
-static bool ape_opp_forced_to_50_partly_25;
+static bool ape_opp_50_partly_25_enabled;
static unsigned long cpufreq_opp_delay = HZ / 5;
@@ -272,7 +272,10 @@ static void update_target(int target)
case PRCMU_QOS_APE_OPP:
switch (extreme_value) {
case 50:
- op = APE_50_OPP;
+ if (ape_opp_50_partly_25_enabled)
+ op = APE_50_PARTLY_25_OPP;
+ else
+ op = APE_50_OPP;
pr_debug("prcmu qos: set ape opp to 50%%\n");
break;
case 100:
@@ -284,9 +287,7 @@ static void update_target(int target)
extreme_value);
goto unlock_and_return;
}
-
- if (!ape_opp_forced_to_50_partly_25)
- (void)prcmu_set_ape_opp(op);
+ (void)prcmu_set_ape_opp(op);
prcmu_debug_ape_opp_log(op);
break;
case PRCMU_QOS_ARM_OPP:
@@ -319,33 +320,21 @@ void prcmu_qos_force_opp(int prcmu_qos_class, s32 i)
void prcmu_qos_voice_call_override(bool enable)
{
- u8 op;
+ int ape_opp;
mutex_lock(&prcmu_qos_mutex);
- ape_opp_forced_to_50_partly_25 = enable;
+ ape_opp_50_partly_25_enabled = enable;
- if (enable) {
- (void)prcmu_set_ape_opp(APE_50_PARTLY_25_OPP);
- goto unlock_and_return;
- }
+ ape_opp = prcmu_get_ape_opp();
- /* Disable: set the OPP according to the current target value. */
- switch (atomic_read(
- &prcmu_qos_array[PRCMU_QOS_APE_OPP]->target_value)) {
- case 50:
- op = APE_50_OPP;
- break;
- case 100:
- op = APE_100_OPP;
- break;
- default:
- goto unlock_and_return;
+ if (ape_opp == APE_50_OPP) {
+ if (enable)
+ prcmu_set_ape_opp(APE_50_PARTLY_25_OPP);
+ else
+ prcmu_set_ape_opp(APE_50_OPP);
}
- (void)prcmu_set_ape_opp(op);
-
-unlock_and_return:
mutex_unlock(&prcmu_qos_mutex);
}
diff --git a/arch/arm/mach-ux500/prcmu-debug.c b/arch/arm/mach-ux500/prcmu-debug.c
index 749bcef85b7..6842e4b68fe 100644
--- a/arch/arm/mach-ux500/prcmu-debug.c
+++ b/arch/arm/mach-ux500/prcmu-debug.c
@@ -203,6 +203,9 @@ static void log_set(struct state_history *sh, u8 opp)
void prcmu_debug_ape_opp_log(u8 opp)
{
+ if (opp == APE_50_PARTLY_25_OPP)
+ opp = APE_50_OPP;
+
log_set(&ape_sh, opp);
}