aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.24/1183-fix-glamo-mci-power-setting-timeout-waiting-for-pcf5.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
committerMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
commit614683faf8029100802db06a825648d0b6490285 (patch)
tree7401b135dc7ce24ff0175e67e0f2ce7f96296ff0 /target/linux/s3c24xx/patches-2.6.24/1183-fix-glamo-mci-power-setting-timeout-waiting-for-pcf5.patch
parent4a018d2445c5f249179ff82c8fffb0e3b717f738 (diff)
downloadupstream-614683faf8029100802db06a825648d0b6490285.tar.gz
upstream-614683faf8029100802db06a825648d0b6490285.tar.bz2
upstream-614683faf8029100802db06a825648d0b6490285.zip
changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko)
SVN-Revision: 13613
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.24/1183-fix-glamo-mci-power-setting-timeout-waiting-for-pcf5.patch')
-rw-r--r--target/linux/s3c24xx/patches-2.6.24/1183-fix-glamo-mci-power-setting-timeout-waiting-for-pcf5.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.24/1183-fix-glamo-mci-power-setting-timeout-waiting-for-pcf5.patch b/target/linux/s3c24xx/patches-2.6.24/1183-fix-glamo-mci-power-setting-timeout-waiting-for-pcf5.patch
new file mode 100644
index 0000000000..843c53d8bd
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.24/1183-fix-glamo-mci-power-setting-timeout-waiting-for-pcf5.patch
@@ -0,0 +1,46 @@
+From 8f4ffd81a902d5499228ce79fcf38c90df52f0e4 Mon Sep 17 00:00:00 2001
+From: Andy Green <andy@openmoko.com>
+Date: Wed, 2 Jul 2008 22:39:41 +0100
+Subject: [PATCH] fix-glamo-mci-power-setting-timeout-waiting-for-pcf50633.patch
+
+Glamo MCI power setting stuff spins on pcf50633
+but it won't hurt if it gives up after a second or
+two instead of stalling the resume silently.
+
+Signed-off-by: Andy Green <andy@openmoko.com>
+---
+ arch/arm/mach-s3c2440/mach-gta02.c | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
+index 5980ea9..69a952a 100644
+--- a/arch/arm/mach-s3c2440/mach-gta02.c
++++ b/arch/arm/mach-s3c2440/mach-gta02.c
+@@ -1265,6 +1265,7 @@ static void
+ gta02_glamo_mmc_set_power(unsigned char power_mode, unsigned short vdd)
+ {
+ int mv = 1650;
++ int timeout = 100;
+
+ printk(KERN_DEBUG "mmc_set_power(power_mode=%u, vdd=%u\n",
+ power_mode, vdd);
+@@ -1281,8 +1282,14 @@ gta02_glamo_mmc_set_power(unsigned char power_mode, unsigned short vdd)
+ case MMC_POWER_ON:
+ case MMC_POWER_UP:
+ /* depend on pcf50633 driver init + not suspended */
+- while (pcf50633_ready(pcf50633_global))
+- msleep(1);
++ while (pcf50633_ready(pcf50633_global) && (timeout--))
++ msleep(5);
++
++ if (!timeout) {
++ printk(KERN_ERR"gta02_glamo_mmc_set_power "
++ "BAILING on timeout\n");
++ return;
++ }
+ /* select and set the voltage */
+ if (vdd > 7) {
+ mv += 300 + 100 * (vdd - 8);
+--
+1.5.6.5
+