1 From 62bc0d984e5c2778e09094ba2e4d885903c6c35b Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Wed, 16 Jul 2008 14:44:10 +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 766473b..f8d307b 100644
15 --- a/arch/arm/plat-s3c24xx/time.c
16 +++ b/arch/arm/plat-s3c24xx/time.c
17 @@ -253,8 +253,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,