1 From 8f4ffd81a902d5499228ce79fcf38c90df52f0e4 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Wed, 2 Jul 2008 22:39:41 +0100
4 Subject: [PATCH] fix-glamo-mci-power-setting-timeout-waiting-for-pcf50633.patch
6 Glamo MCI power setting stuff spins on pcf50633
7 but it won't hurt if it gives up after a second or
8 two instead of stalling the resume silently.
10 Signed-off-by: Andy Green <andy@openmoko.com>
12 arch/arm/mach-s3c2440/mach-gta02.c | 11 +++++++++--
13 1 files changed, 9 insertions(+), 2 deletions(-)
15 diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
16 index 5980ea9..69a952a 100644
17 --- a/arch/arm/mach-s3c2440/mach-gta02.c
18 +++ b/arch/arm/mach-s3c2440/mach-gta02.c
19 @@ -1265,6 +1265,7 @@ static void
20 gta02_glamo_mmc_set_power(unsigned char power_mode, unsigned short vdd)
25 printk(KERN_DEBUG "mmc_set_power(power_mode=%u, vdd=%u\n",
27 @@ -1281,8 +1282,14 @@ gta02_glamo_mmc_set_power(unsigned char power_mode, unsigned short vdd)
30 /* depend on pcf50633 driver init + not suspended */
31 - while (pcf50633_ready(pcf50633_global))
33 + while (pcf50633_ready(pcf50633_global) && (timeout--))
37 + printk(KERN_ERR"gta02_glamo_mmc_set_power "
38 + "BAILING on timeout\n");
41 /* select and set the voltage */
43 mv += 300 + 100 * (vdd - 8);