[PATCH 6/6] arm/imx6q: add suspend/resume support
From: Barry Song <hidden>
Date: 2011-09-07 13:50:44
+
+static int imx6q_pm_enter(suspend_state_t state)
+{
+ ? ? ? switch (state) {
+ ? ? ? case PM_SUSPEND_MEM:
+ ? ? ? ? ? ? ? imx_local_timer_pre_suspend();
+ ? ? ? ? ? ? ? imx_gpc_pre_suspend();
+ ? ? ? ? ? ? ? outer_flush_all();
+ ? ? ? ? ? ? ? outer_disable();
+ ? ? ? ? ? ? ? imx_set_cpu_jump(0, v7_cpu_resume);
+
+ ? ? ? ? ? ? ? /* Zzz ... */
+ ? ? ? ? ? ? ? cpu_suspend(0, imx6q_suspend_finish);
+
+ ? ? ? ? ? ? ? imx_smp_prepare();
+ ? ? ? ? ? ? ? l2x0_of_init(0, ~0UL);it is pretty clear and good. i think we can refine arch/arm/mach-prima2/pm.c to the way you are suspending/resuming l2. on prima2, l2 will totally lose power in suspend cycle. i remember you once said imx6q will retain l2 in suspend cycle?
+ ? ? ? ? ? ? ? imx_gpc_post_resume(); + ? ? ? ? ? ? ? imx_local_timer_post_resume(); + ? ? ? ? ? ? ? break; + ? ? ? default: + ? ? ? ? ? ? ? return -EINVAL; + ? ? ? } + + ? ? ? return 0; +}
thanks barry