r2041 - trunk/src/target/u-boot/patches
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Sat May 19 09:44:25 CEST 2007
Author: laforge
Date: 2007-05-19 09:44:20 +0200 (Sat, 19 May 2007)
New Revision: 2041
Modified:
trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch
Log:
* fix STALL case, i.e. actually stall the USB bus if usb stack asks the
driver to send a stall packet. This also means that dfu-util will return a
proper error message in case DFU has some error (such as 'file not targeted for
this device') and recovers properly after it.
* use our own debug macros to prevent reentrance (Closes: #420)
Modified: trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch 2007-05-19 05:55:47 UTC (rev 2040)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch 2007-05-19 07:44:20 UTC (rev 2041)
@@ -17,7 +17,7 @@
===================================================================
--- /dev/null
+++ u-boot/drivers/usbdcore_s3c2410.c
-@@ -0,0 +1,721 @@
+@@ -0,0 +1,730 @@
+/* S3C2410 USB Device Controller Driver for u-boot
+ *
+ * (C) Copyright 2007 by OpenMoko, Inc.
@@ -48,6 +48,15 @@
+
+#include <common.h>
+
++/* we can't use the regular debug macros since the console might be
++ * set to usbtty, which would cause deadlocks! */
++#ifdef DEBUG
++#undef debug
++#undef debugX
++#define debug(fmt,args...) serial_printf (fmt ,##args)
++#define debugX(level,fmt,args...) if (DEBUG>=level) serial_printf(fmt,##args)
++#endif
++
+DECLARE_GLOBAL_DATA_PTR;
+
+#include <asm/io.h>
@@ -233,7 +242,7 @@
+ /* Not a setup packet, stall next EP0 transaction */
+ debug("can't parse setup packet1\n");
+ set_ep0_ss();
-+ //set_ep0_de_out();
++ set_ep0_de_out();
+ ep0->state = EP0_IDLE;
+ return;
+ }
@@ -1170,7 +1179,7 @@
===================================================================
--- u-boot.orig/board/neo1973/common/cmd_neo1973.c
+++ u-boot/board/neo1973/common/cmd_neo1973.c
-@@ -93,6 +93,18 @@
+@@ -72,6 +72,18 @@
neo1973_vibrator(1);
else
neo1973_vibrator(0);
@@ -1189,7 +1198,7 @@
} else {
out_help:
printf("Usage:\n%s\n", cmdtp->usage);
-@@ -116,5 +128,6 @@
+@@ -95,5 +107,6 @@
"neo1973 charger off - disable charging\n"
"neo1973 backlight (on|off) - switch backlight on or off\n"
"neo1973 vibrator (on|off) - switch vibrator on or off\n"
More information about the commitlog
mailing list