summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2012-07-04 04:09:37 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2012-07-05 13:10:09 +0800
commit0f738e1c598e8dec5b5251bea56102cc23c8956c (patch)
tree2dcff377d2ce22d17a02fc893a1537ba64eac44d
parent5012bea536b510c5bf81e7b26fb238354995096e (diff)
ENGR00215668 [MX6]Only restore PU field value instead of whole reg value
Only need to save and restore PU field register value instead of the whole CORE REG value to avoid changing SOC and ARM voltage. No need to increase BUS freq before CPU freq increase when system is in audio bus mode. Signed-off-by: Anson Huang <b20788@freescale.com>
-rw-r--r--arch/arm/mach-mx6/bus_freq.c9
-rwxr-xr-xarch/arm/plat-mxc/cpufreq.c3
2 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-mx6/bus_freq.c b/arch/arm/mach-mx6/bus_freq.c
index 6ebd76c1bd7d..cb4d6eaf880f 100644
--- a/arch/arm/mach-mx6/bus_freq.c
+++ b/arch/arm/mach-mx6/bus_freq.c
@@ -203,7 +203,8 @@ static void reduce_bus_freq_handler(struct work_struct *work)
__raw_writel(reg, gpc_base + 0x14);
/* PU power gating. */
- org_ldo = reg = __raw_readl(ANADIG_REG_CORE);
+ reg = __raw_readl(ANADIG_REG_CORE);
+ org_ldo = reg & (ANADIG_REG_TARGET_MASK << ANADIG_REG1_PU_TARGET_OFFSET);
reg &= ~(ANADIG_REG_TARGET_MASK << ANADIG_REG1_PU_TARGET_OFFSET);
__raw_writel(reg, ANADIG_REG_CORE);
@@ -212,6 +213,7 @@ static void reduce_bus_freq_handler(struct work_struct *work)
reg |= 0x80000000;
__raw_writel(reg, ANADIG_MISC1_REG);
}
+
mutex_unlock(&bus_freq_mutex);
}
@@ -265,8 +267,9 @@ int set_high_bus_freq(int high_bus_freq)
/* Enable the PU LDO */
if (low_bus_freq_mode || audio_bus_freq_mode) {
- /* Set the voltage of VDDSOC as in normal mode. */
- __raw_writel(org_ldo, ANADIG_REG_CORE);
+ /* Set the voltage of VDDPU as in normal mode. */
+ __raw_writel(org_ldo | (__raw_readl(ANADIG_REG_CORE) &
+ (~(ANADIG_REG_TARGET_MASK << ANADIG_REG1_PU_TARGET_OFFSET))), ANADIG_REG_CORE);
/* Need to wait for the regulator to come back up */
/*
diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c
index d3e16ae24a50..f79d8e771b49 100755
--- a/arch/arm/plat-mxc/cpufreq.c
+++ b/arch/arm/plat-mxc/cpufreq.c
@@ -87,7 +87,6 @@ extern struct regulator *cpu_regulator;
extern int dvfs_core_is_active;
extern struct cpu_op *(*get_cpu_op)(int *op);
extern int low_bus_freq_mode;
-extern int audio_bus_freq_mode;
extern int high_bus_freq_mode;
extern int set_low_bus_freq(void);
extern int set_high_bus_freq(int high_bus_speed);
@@ -244,7 +243,7 @@ int set_cpu_freq(int freq)
/*Set the voltage for the GP domain. */
if (freq > org_cpu_rate) {
- if (low_bus_freq_mode || audio_bus_freq_mode)
+ if (low_bus_freq_mode)
set_high_bus_freq(0);
#ifdef CONFIG_MX6_INTER_LDO_BYPASS
if (cpu_freq_suspend_in) {