resume/suspend observations

Werner Almesberger werner at openmoko.org
Sun Feb 24 13:26:13 CET 2008


A few more resume/suspend observations from my experiments:

- with kernel and defconfig from SVN, plus the workqueue fix below,
  none of the I2C issues or long delays happen

- trying to resume with AUX causes the u-boot in NOR to start without
  doing the resume. Instead, u-boot comes up but power seems to be
  very unstable (the display content quivers horizontally), and the
  system crashes and powers down within seconds.

- inserting/removing the headset allows us to resume immediately

- pressing the HOLD button (on the headset) has no effect at all.
  Apparently, this is a solved issue. Needs checking.

- when pressing the POWER button, the system resumes after about
  5-6 seconds

- if we suspend after having resumed with a PMU event (i.e., POWER
  or an RTC alarm), no other PMU event will bring us out of suspend

- after resume, the display stays white. Restarting Xglamo makes no
  difference.

Using Andy's .config (and the SVN tree), my system still behaves most
of the time. In particular, there is no I2C timeout. However, a few
anomalies creep up:

- every once in a while, the kernel hangs right after initializing the
  Glamo, about 2s into the kernel start (this is not related to suspend)

- after resume, the kernel every once in a while hangs in
  "Restarting tasks ..."

The workqueue fix: the initialization of clocks uses mutexes, but we
execute the resume in an interrupt context. We therefore have to hand
this task to a non-interrupt.

- Werner

----------------------------------- Changes -----------------------------------

Index: linux-2.6.24/arch/arm/plat-s3c24xx/time.c
===================================================================
--- linux-2.6.24.orig/arch/arm/plat-s3c24xx/time.c
+++ linux-2.6.24/arch/arm/plat-s3c24xx/time.c
@@ -255,8 +255,24 @@ static void __init s3c2410_timer_init (v
 	setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
 }
 
+static void s3c2410_timer_resume_work(struct work_struct *work)
+{
+	s3c2410_timer_setup();
+}
+
+static void s3c2410_timer_resume(void)
+{
+	static DECLARE_WORK(work, s3c2410_timer_resume_work);
+	int res;
+
+	res = schedule_work(&work);
+	if (!res)
+		printk(KERN_ERR
+		    "s3c2410_timer_resume_work already queued ???\n");
+}
+
 struct sys_timer s3c24xx_timer = {
 	.init		= s3c2410_timer_init,
 	.offset		= s3c2410_gettimeoffset,
-	.resume		= s3c2410_timer_setup
+	.resume		= s3c2410_timer_resume,
 };




More information about the openmoko-kernel mailing list