From fac7f7f84f3771c5247c7fdee825c092077984f5 Mon Sep 17 00:00:00 2001 From: Mirko Vogt Date: Fri, 12 Dec 2008 11:58:53 +0000 Subject: changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13613 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../1117-audio-tickless-timeout.patch.patch | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 target/linux/s3c24xx/patches-2.6.24/1117-audio-tickless-timeout.patch.patch (limited to 'target/linux/s3c24xx/patches-2.6.24/1117-audio-tickless-timeout.patch.patch') diff --git a/target/linux/s3c24xx/patches-2.6.24/1117-audio-tickless-timeout.patch.patch b/target/linux/s3c24xx/patches-2.6.24/1117-audio-tickless-timeout.patch.patch new file mode 100644 index 0000000000..1c74f1bfed --- /dev/null +++ b/target/linux/s3c24xx/patches-2.6.24/1117-audio-tickless-timeout.patch.patch @@ -0,0 +1,57 @@ +From 5d6f04132cb5bd8fa8f1c9c9c3dc337aeae18f4c Mon Sep 17 00:00:00 2001 +From: Werner Almesberger +Date: Sun, 13 Apr 2008 07:25:55 +0100 +Subject: [PATCH] audio-tickless-timeout.patch + +When we resume, we can end up in +sound/soc/s3c24xx/s3c24xx-i2s.c:s3c24xx_snd_lrsync +with the timer tick still disabled, and the LR signal never happening. +Thus, we loop forever. + +The patch below changes the timeout mechanism to use udelay, which +doesn't need timer ticks. + +Note that this code is in a module, so to get the fix, you have to +build the modules, and update them. + +The kernel now resumes but does the ugly GSM modem ticking. I'll have +to find a good place to turn that one off ... + +- Werner + +---------------------------------- cut here ----------------------------------- + +- sound/soc/s3c24xx/s3c24xx-i2s.c (s3c24xx_snd_lrsync): in resume, we may + call s3c24xx_snd_lrsync with timer ticks disabled, thus jiffies never + change. Use udelay to avoid this problem. +--- + sound/soc/s3c24xx/s3c24xx-i2s.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c +index 4d74cc0..43fd25a 100644 +--- a/sound/soc/s3c24xx/s3c24xx-i2s.c ++++ b/sound/soc/s3c24xx/s3c24xx-i2s.c +@@ -180,7 +180,7 @@ static void s3c24xx_snd_rxctrl(int on) + static int s3c24xx_snd_lrsync(void) + { + u32 iiscon; +- unsigned long timeout = jiffies + msecs_to_jiffies(5); ++ int timeout = 50; /* 5ms */ + + DBG("Entered %s\n", __FUNCTION__); + +@@ -189,8 +189,9 @@ static int s3c24xx_snd_lrsync(void) + if (iiscon & S3C2410_IISCON_LRINDEX) + break; + +- if (timeout < jiffies) ++ if (!--timeout) + return -ETIMEDOUT; ++ udelay(100); + } + + return 0; +-- +1.5.6.5 + -- cgit v1.2.3