summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx6/pm.c
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/pm.c
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/pm.c')
-rw-r--r--arch/arm/mach-mx6/pm.c20
1 files changed, 20 insertions, 0 deletions
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,