1 From fa1e8c2fc849472cddb65bc3138944382b320589 Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Fri, 4 Apr 2008 11:30:15 +0100
4 Subject: [PATCH] resume-timers-wq.patch
5 The initialization of clocks uses mutexes, but we execute the resume in
6 an interrupt context. We therefore have to hand this task to a non-interrupt.
8 Adapted from a patch by Andy Green.
10 arch/arm/plat-s3c24xx/time.c | 18 +++++++++++++++++-
11 1 files changed, 17 insertions(+), 1 deletions(-)
13 diff --git a/arch/arm/plat-s3c24xx/time.c b/arch/arm/plat-s3c24xx/time.c
14 index 2ec1daa..c11d0dd 100644
15 --- a/arch/arm/plat-s3c24xx/time.c
16 +++ b/arch/arm/plat-s3c24xx/time.c
17 @@ -255,8 +255,24 @@ static void __init s3c2410_timer_init (void)
18 setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
21 +static void s3c2410_timer_resume_work(struct work_struct *work)
23 + s3c2410_timer_setup();
26 +static void s3c2410_timer_resume(void)
28 + static DECLARE_WORK(work, s3c2410_timer_resume_work);
31 + res = schedule_work(&work);
34 + "s3c2410_timer_resume_work already queued ???\n");
37 struct sys_timer s3c24xx_timer = {
38 .init = s3c2410_timer_init,
39 .offset = s3c2410_gettimeoffset,
40 - .resume = s3c2410_timer_setup
41 + .resume = s3c2410_timer_resume,