summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx6
diff options
context:
space:
mode:
authorRobin Gong <B38343@freescale.com>2012-06-28 14:14:46 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:39:09 +0800
commite190dbf7ad3d3e659af0c97f8620b3a07a56076c (patch)
tree893b03973f0cf1a8c98bd21b0e61318b6617dddb /arch/arm/mach-mx6
parent0665062cdf6b558d8f66800ea5944a953aa0741a (diff)
ENGR00215188-1 PFUZE CPUFREQ: reconstruct LDO bypass function
As before, raw I2C operation is added in suspend interface of cpufeq driver,so that we can raise up cpu frequency and voltage after I2C driver suspended.But the code is not platform independent if customer use another pmic whose I2C slave address is different with pfuze. Now, we rasie up cpu frequency and disable cpu frequency change in more earlier than before. If system begin to suspend flow, we will do this. Signed-off-by: Robin Gong <B38343@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx6')
-rw-r--r--arch/arm/mach-mx6/mx6q_sabresd_pmic_pfuze100.c9
-rw-r--r--arch/arm/mach-mx6/pm.c20
2 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/mx6q_sabresd_pmic_pfuze100.c b/arch/arm/mach-mx6/mx6q_sabresd_pmic_pfuze100.c
index 2fc47e2a98b0..f7e7099468c1 100644
--- a/arch/arm/mach-mx6/mx6q_sabresd_pmic_pfuze100.c
+++ b/arch/arm/mach-mx6/mx6q_sabresd_pmic_pfuze100.c
@@ -71,6 +71,9 @@
#define PFUZE100_SWBSTCON1 102
#define PFUZE100_SWBSTCON1_SWBSTMOD_VAL (0x1<<2)
#define PFUZE100_SWBSTCON1_SWBSTMOD_M (0x3<<2)
+#define PFUZE100_SW1ACON 36
+#define PFUZE100_SW1ACON_SPEED_VAL (0x1<<6) /*default */
+#define PFUZE100_SW1ACON_SPEED_M (0x3<<6)
extern u32 arm_max_freq;
@@ -418,6 +421,12 @@ static int pfuze100_init(struct mc_pfuze *pfuze)
PFUZE100_SW1CSTANDBY_STBY_VAL);
if (ret)
goto err;
+ /*set SW1ABDVSPEED as 25mV step each 4us,quick than 16us before.*/
+ ret = pfuze_reg_rmw(pfuze, PFUZE100_SW1ACON,
+ PFUZE100_SW1ACON_SPEED_M,
+ PFUZE100_SW1ACON_SPEED_VAL);
+ if (ret)
+ goto err;
return 0;
err:
printk(KERN_ERR "pfuze100 init error!\n");
diff --git a/arch/arm/mach-mx6/pm.c b/arch/arm/mach-mx6/pm.c
index 229de6651266..ee7fd0ae2111 100644
--- a/arch/arm/mach-mx6/pm.c
+++ b/arch/arm/mach-mx6/pm.c
@@ -72,6 +72,11 @@ static struct clk *axi_org_parent;
static struct pm_platform_data *pm_data;
+
+#ifdef CONFIG_MX6_INTER_LDO_BYPASS
+void mxc_cpufreq_suspend(void);
+void mxc_cpufreq_resume(void);
+#endif
#if defined(CONFIG_CPU_FREQ)
extern int set_cpu_freq(int wp);
#endif
@@ -373,6 +378,7 @@ static int mx6_suspend_enter(suspend_state_t state)
*/
static int mx6_suspend_prepare(void)
{
+
return 0;
}
@@ -383,11 +389,22 @@ static void mx6_suspend_finish(void)
{
}
+#ifdef CONFIG_MX6_INTER_LDO_BYPASS
+static int mx6_suspend_begin(suspend_state_t state)
+{
+ mxc_cpufreq_suspend();
+ return 0;
+}
+#endif
+
/*
* Called after devices are re-setup, but before processes are thawed.
*/
static void mx6_suspend_end(void)
{
+#ifdef CONFIG_MX6_INTER_LDO_BYPASS
+ mxc_cpufreq_resume();
+#endif
}
static int mx6_pm_valid(suspend_state_t state)
@@ -397,6 +414,9 @@ static int mx6_pm_valid(suspend_state_t state)
struct platform_suspend_ops mx6_suspend_ops = {
.valid = mx6_pm_valid,
+#ifdef CONFIG_MX6_INTER_LDO_BYPASS
+ .begin = mx6_suspend_begin,
+#endif
.prepare = mx6_suspend_prepare,
.enter = mx6_suspend_enter,
.finish = mx6_suspend_finish,