fix IMQ on linux 2.6.27 and 2.6.28
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1007-resume-timers-wq.patch.patch
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.
7
8 Adapted from a patch by Andy Green.
9 ---
10 arch/arm/plat-s3c24xx/time.c | 18 +++++++++++++++++-
11 1 files changed, 17 insertions(+), 1 deletions(-)
12
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);
19 }
20
21 +static void s3c2410_timer_resume_work(struct work_struct *work)
22 +{
23 + s3c2410_timer_setup();
24 +}
25 +
26 +static void s3c2410_timer_resume(void)
27 +{
28 + static DECLARE_WORK(work, s3c2410_timer_resume_work);
29 + int res;
30 +
31 + res = schedule_work(&work);
32 + if (!res)
33 + printk(KERN_ERR
34 + "s3c2410_timer_resume_work already queued ???\n");
35 +}
36 +
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,
42 };
43 --
44 1.5.6.5
45
This page took 0.059483 seconds and 5 git commands to generate.