[PATCH] fix-dont-do-i2c-with-irqs-off.patch
Andy Green
andy at openmoko.com
Fri Aug 1 09:44:39 CEST 2008
We can't afford turning off interrupts for long periods in
U-Boot as the USB stack fails and leaves the USB device in
Insane Spam Mode.
This patch allowed 50 resets in a row giving normal USB
behaviour with no sign of the issue any more.
Signed-off-by: Andy Green <andy at openmoko.com>
---
board/neo1973/gta02/gta02.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/board/neo1973/gta02/gta02.c b/board/neo1973/gta02/gta02.c
index c4766b0..3d8f14e 100644
--- a/board/neo1973/gta02/gta02.c
+++ b/board/neo1973/gta02/gta02.c
@@ -405,7 +405,13 @@ static void wait_for_power(void)
if (pcf50633_usb_last_maxcurrent >= 500)
break;
- cpu_idle();
+ /* cpu_idle sits with interrupts off destroying USB operation
+ * don't run it unless we are in trouble
+ */
+ if (!battery_is_good())
+ cpu_idle();
+ else
+ udelay(1000000);
if (neo1973_new_second()) {
/*
More information about the openmoko-kernel
mailing list