1 PXA Timers: Stop interrupts becomming enabled when they shouldn't be
3 Calling save_time_delta() from within pxa_pm_enter() isn't allowed as it
4 will reenable interrupts in a function where they should be disabled
5 throughout. These calls can be made safely from the time.c suspend/resume
8 Signed-Off-By: Richard Purdie <rpurdie@rpsys.net>
11 Index: linux-2.6.12/arch/arm/mach-pxa/pm.c
12 ===================================================================
13 --- linux-2.6.12.orig/arch/arm/mach-pxa/pm.c 2005-08-21 20:05:16.000000000 +0100
14 +++ linux-2.6.12/arch/arm/mach-pxa/pm.c 2005-08-21 20:06:02.000000000 +0100
17 unsigned long sleep_save[SLEEP_SAVE_SIZE];
18 unsigned long checksum = 0;
19 - struct timespec delta, rtc;
21 extern void pxa_cpu_pm_enter(suspend_state_t state);
24 iwmmxt_task_disable(NULL);
27 - /* preserve current time */
30 - save_time_delta(&delta, &rtc);
32 SAVE(GPLR0); SAVE(GPLR1); SAVE(GPLR2);
33 SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2);
34 SAVE(GRER0); SAVE(GRER1); SAVE(GRER2);
39 - /* restore current time */
41 - restore_time_delta(&delta, &rtc);
44 printk(KERN_DEBUG "*** made it back from resume\n");
46 Index: linux-2.6.12/arch/arm/mach-pxa/time.c
47 ===================================================================
48 --- linux-2.6.12.orig/arch/arm/mach-pxa/time.c 2005-08-21 20:04:39.000000000 +0100
49 +++ linux-2.6.12/arch/arm/mach-pxa/time.c 2005-08-21 20:05:24.000000000 +0100
53 static unsigned long osmr[4], oier;
54 +static struct timespec delta, rtc;
56 static void pxa_timer_suspend(void)
63 + /* preserve current time */
66 + save_time_delta(&delta, &rtc);
69 static void pxa_timer_resume(void)
71 + /* restore current time */
73 + restore_time_delta(&delta, &rtc);