Thread (69 messages) 69 messages, 12 authors, 2011-09-17
STALE5388d
Revisions (14)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 current
  5. v1 [diff vs current]
  6. v2 [diff vs current]
  7. v2 [diff vs current]
  8. v2 [diff vs current]
  9. v2 [diff vs current]
  10. v3 [diff vs current]
  11. v4 [diff vs current]
  12. v4 [diff vs current]
  13. v4 [diff vs current]
  14. v5 [diff vs current]

[PATCH 6/6] arm/imx6q: add suspend/resume support

From: Shawn Guo <hidden>
Date: 2011-09-08 06:23:02

On Wed, Sep 07, 2011 at 09:50:44PM +0800, Barry Song wrote:
quoted
+
+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?
Yes, if you lose L2 power in suspend, it's the easiest way for you to
resume L2.

For my case which retains L2, I actually do not want to call this
function which will invalidate L2.  But since we still have problem
to use rmk's generic suspend/resume updates (ARM: pm: add L2 cache
cleaning for suspend), we have to flush the entire L2 on imx6q for now.

Regards,
Shawn
quoted
+ ? ? ? ? ? ? ? imx_gpc_post_resume();
+ ? ? ? ? ? ? ? imx_local_timer_post_resume();
+ ? ? ? ? ? ? ? break;
+ ? ? ? default:
+ ? ? ? ? ? ? ? return -EINVAL;
+ ? ? ? }
+
+ ? ? ? return 0;
+}
thanks
barry
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help