r1155 - trunk/src/target/u-boot/patches
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Wed Feb 28 03:53:27 CET 2007
Author: laforge
Date: 2007-02-28 03:53:26 +0100 (Wed, 28 Feb 2007)
New Revision: 1155
Modified:
trunk/src/target/u-boot/patches/uboot-dfu.patch
Log:
* add DFU relevant config fields for QT2410
Modified: trunk/src/target/u-boot/patches/uboot-dfu.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-dfu.patch 2007-02-28 02:45:22 UTC (rev 1154)
+++ trunk/src/target/u-boot/patches/uboot-dfu.patch 2007-02-28 02:53:26 UTC (rev 1155)
@@ -1,7 +1,7 @@
Index: u-boot/drivers/usbdcore_ep0.c
===================================================================
---- u-boot.orig/drivers/usbdcore_ep0.c
-+++ u-boot/drivers/usbdcore_ep0.c
+--- u-boot.orig/drivers/usbdcore_ep0.c 2007-02-28 03:51:25.000000000 +0100
++++ u-boot/drivers/usbdcore_ep0.c 2007-02-28 03:51:25.000000000 +0100
@@ -42,10 +42,15 @@
*/
@@ -18,7 +18,7 @@
#if 0
#define dbg_ep0(lvl,fmt,args...) serial_printf("[%s] %s:%d: "fmt"\n",__FILE__,__FUNCTION__,__LINE__,##args)
#else
-@@ -213,7 +218,7 @@ static int ep0_get_descriptor (struct us
+@@ -213,7 +218,7 @@
urb->buffer = device_descriptor;
urb->actual_length = MIN(sizeof(*device_descriptor), max);
}
@@ -27,7 +27,7 @@
break;
case USB_DESCRIPTOR_TYPE_CONFIGURATION:
-@@ -267,7 +272,24 @@ static int ep0_get_descriptor (struct us
+@@ -267,7 +272,24 @@
return -1;
case USB_DESCRIPTOR_TYPE_ENDPOINT:
return -1;
@@ -52,7 +52,7 @@
{
return -1; /* unsupported at this time */
#if 0
-@@ -294,6 +316,7 @@ static int ep0_get_descriptor (struct us
+@@ -294,6 +316,7 @@
max);
#endif
}
@@ -60,7 +60,7 @@
break;
case USB_DESCRIPTOR_TYPE_REPORT:
{
-@@ -388,6 +411,24 @@ int ep0_recv_setup (struct urb *urb)
+@@ -388,6 +411,24 @@
le16_to_cpu (request->wLength),
USBD_DEVICE_REQUESTS (request->bRequest));
@@ -85,7 +85,7 @@
/* handle USB Standard Request (c.f. USB Spec table 9-2) */
if ((request->bmRequestType & USB_REQ_TYPE_MASK) != 0) {
if (device->device_state <= STATE_CONFIGURED)
-@@ -570,7 +611,8 @@ int ep0_recv_setup (struct urb *urb)
+@@ -570,7 +611,8 @@
device->interface = le16_to_cpu (request->wIndex);
device->alternate = le16_to_cpu (request->wValue);
/*dbg_ep0(2, "set interface: %d alternate: %d", device->interface, device->alternate); */
@@ -97,9 +97,9 @@
case USB_REQ_GET_STATUS:
Index: u-boot/drivers/usbdfu.c
===================================================================
---- /dev/null
-+++ u-boot/drivers/usbdfu.c
-@@ -0,0 +1,997 @@
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ u-boot/drivers/usbdfu.c 2007-02-28 03:51:58.000000000 +0100
+@@ -0,0 +1,1000 @@
+/*
+ * (C) 2007 by OpenMoko, Inc.
+ * Author: Harald Welte <laforge at openmoko.org>
@@ -1006,8 +1006,11 @@
+ strdesc = create_usbstring(CONFIG_DFU_ALT0_STR);
+ } else {
+ struct part_info *part = get_partition_nand(i-1);
-+ if (!part)
-+ continue;
++ if (!part) {
++ part = create_usbstring("undefined partition");
++ if (!part)
++ continue;
++ }
+ strdesc = create_usbstring(part->name);
+ }
+ usb_strings[STR_COUNT+i+1] = strdesc;
@@ -1099,9 +1102,9 @@
+#endif /* CONFIG_USBD_DFU */
Index: u-boot/drivers/Makefile
===================================================================
---- u-boot.orig/drivers/Makefile
-+++ u-boot/drivers/Makefile
-@@ -46,7 +46,7 @@ COBJS = 3c589.o 5701rls.o ali512x.o atme
+--- u-boot.orig/drivers/Makefile 2007-02-28 03:51:25.000000000 +0100
++++ u-boot/drivers/Makefile 2007-02-28 03:51:25.000000000 +0100
+@@ -46,7 +46,7 @@
sl811_usb.o sm501.o smc91111.o smiLynxEM.o \
status_led.o sym53c8xx.o systemace.o ahci.o \
ti_pci1410a.o tigon3.o tsec.o \
@@ -1112,8 +1115,8 @@
pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \
Index: u-boot/drivers/usbdcore.c
===================================================================
---- u-boot.orig/drivers/usbdcore.c
-+++ u-boot/drivers/usbdcore.c
+--- u-boot.orig/drivers/usbdcore.c 2007-02-28 03:47:38.000000000 +0100
++++ u-boot/drivers/usbdcore.c 2007-02-28 03:51:25.000000000 +0100
@@ -31,6 +31,7 @@
#include <malloc.h>
@@ -1122,7 +1125,7 @@
#define MAX_INTERFACES 2
-@@ -212,6 +213,10 @@ struct usb_alternate_instance *usbd_devi
+@@ -212,6 +213,10 @@
*/
struct usb_device_descriptor *usbd_device_device_descriptor (struct usb_device_instance *device, int port)
{
@@ -1133,7 +1136,7 @@
return (device->device_descriptor);
}
-@@ -232,6 +237,10 @@ struct usb_configuration_descriptor *usb
+@@ -232,6 +237,10 @@
if (!(configuration_instance = usbd_device_configuration_instance (device, port, configuration))) {
return NULL;
}
@@ -1144,7 +1147,7 @@
return (configuration_instance->configuration_descriptor);
}
-@@ -253,6 +262,13 @@ struct usb_interface_descriptor *usbd_de
+@@ -253,6 +262,13 @@
if (!(interface_instance = usbd_device_interface_instance (device, port, configuration, interface))) {
return NULL;
}
@@ -1158,7 +1161,7 @@
if ((alternate < 0) || (alternate >= interface_instance->alternates)) {
return NULL;
}
-@@ -681,4 +697,7 @@ void usbd_device_event_irq (struct usb_d
+@@ -681,4 +697,7 @@
/* usbdbg("calling device->event"); */
device->event(device, event, data);
}
@@ -1168,8 +1171,8 @@
}
Index: u-boot/drivers/usbtty.c
===================================================================
---- u-boot.orig/drivers/usbtty.c
-+++ u-boot/drivers/usbtty.c
+--- u-boot.orig/drivers/usbtty.c 2007-02-28 03:51:24.000000000 +0100
++++ u-boot/drivers/usbtty.c 2007-02-28 03:51:25.000000000 +0100
@@ -31,6 +31,8 @@
#include "usbtty.h"
#include "usb_cdc_acm.h"
@@ -1179,7 +1182,7 @@
#include <config.h> /* If defined, override Linux identifiers with
* vendor specific ones */
-@@ -118,7 +120,7 @@ extern struct usb_string_descriptor **us
+@@ -118,7 +120,7 @@
static unsigned short rx_endpoint = 0;
static unsigned short tx_endpoint = 0;
static unsigned short interface_count = 0;
@@ -1188,7 +1191,7 @@
/* USB Descriptor Strings */
static u8 wstrLang[4] = {4,USB_DT_STRING,0x9,0x4};
-@@ -169,6 +171,10 @@ struct acm_config_desc {
+@@ -169,6 +171,10 @@
struct usb_interface_descriptor data_class_interface;
struct usb_endpoint_descriptor
data_endpoints[NUM_ENDPOINTS-1] __attribute__((packed));
@@ -1199,7 +1202,7 @@
} __attribute__((packed));
static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = {
-@@ -179,7 +185,11 @@ static struct acm_config_desc acm_config
+@@ -179,7 +185,11 @@
.bDescriptorType = USB_DT_CONFIG,
.wTotalLength =
cpu_to_le16(sizeof(struct acm_config_desc)),
@@ -1211,7 +1214,7 @@
.bConfigurationValue = 1,
.iConfiguration = STR_CONFIG,
.bmAttributes =
-@@ -278,6 +288,11 @@ static struct acm_config_desc acm_config
+@@ -278,6 +288,11 @@
.bInterval = 0xFF,
},
},
@@ -1223,7 +1226,7 @@
},
};
-@@ -390,7 +405,7 @@ static int fill_buffer (circbuf_t * buf)
+@@ -390,7 +405,7 @@
void usbtty_poll (void);
/* utility function for converting char* to wide string used by USB */
@@ -1232,7 +1235,7 @@
{
int i;
for (i = 0; i < strlen (str) && str[i]; i++){
-@@ -652,6 +667,9 @@ static void usbtty_init_instances (void)
+@@ -652,6 +667,9 @@
device_instance->bus = bus_instance;
device_instance->configurations = NUM_CONFIGS;
device_instance->configuration_instance_array = config_instance;
@@ -1244,8 +1247,8 @@
memset (bus_instance, 0, sizeof (struct usb_bus_instance));
Index: u-boot/include/configs/neo1973.h
===================================================================
---- u-boot.orig/include/configs/neo1973.h
-+++ u-boot/include/configs/neo1973.h
+--- u-boot.orig/include/configs/neo1973.h 2007-02-28 03:51:25.000000000 +0100
++++ u-boot/include/configs/neo1973.h 2007-02-28 03:51:25.000000000 +0100
@@ -165,7 +165,7 @@
*/
#define CONFIG_STACKSIZE (128*1024) /* regular stack */
@@ -1268,8 +1271,8 @@
* Physical Memory Map
Index: u-boot/include/usb_dfu.h
===================================================================
---- /dev/null
-+++ u-boot/include/usb_dfu.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ u-boot/include/usb_dfu.h 2007-02-28 03:51:25.000000000 +0100
@@ -0,0 +1,97 @@
+#ifndef _DFU_H
+#define _DFU_H
@@ -1370,8 +1373,8 @@
+#endif /* _DFU_H */
Index: u-boot/include/usb_dfu_descriptors.h
===================================================================
---- /dev/null
-+++ u-boot/include/usb_dfu_descriptors.h
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ u-boot/include/usb_dfu_descriptors.h 2007-02-28 03:51:25.000000000 +0100
@@ -0,0 +1,94 @@
+#ifndef _USB_DFU_H
+#define _USB_DFU_H
@@ -1469,8 +1472,8 @@
+#endif /* _USB_DFU_H */
Index: u-boot/include/usbdcore.h
===================================================================
---- u-boot.orig/include/usbdcore.h
-+++ u-boot/include/usbdcore.h
+--- u-boot.orig/include/usbdcore.h 2007-02-28 03:51:24.000000000 +0100
++++ u-boot/include/usbdcore.h 2007-02-28 03:51:25.000000000 +0100
@@ -33,6 +33,7 @@
#include <common.h>
@@ -1479,7 +1482,7 @@
#define MAX_URBS_QUEUED 5
-@@ -475,7 +476,11 @@ typedef struct urb_link {
+@@ -475,7 +476,11 @@
* function driver to inform it that data has arrived.
*/
@@ -1491,7 +1494,7 @@
struct urb {
struct usb_endpoint_instance *endpoint;
-@@ -603,6 +608,12 @@ struct usb_device_instance {
+@@ -603,6 +608,12 @@
unsigned long usbd_rxtx_timestamp;
unsigned long usbd_last_rxtx_timestamp;
@@ -1504,7 +1507,7 @@
};
/* Bus Interface configuration structure
-@@ -632,6 +643,8 @@ extern char *usbd_device_status[];
+@@ -632,6 +643,8 @@
extern char *usbd_device_requests[];
extern char *usbd_device_descriptors[];
@@ -1515,8 +1518,8 @@
urb_link *first_urb_link (urb_link * hd);
Index: u-boot/drivers/usbtty.h
===================================================================
---- u-boot.orig/drivers/usbtty.h
-+++ u-boot/drivers/usbtty.h
+--- u-boot.orig/drivers/usbtty.h 2007-02-28 03:51:25.000000000 +0100
++++ u-boot/drivers/usbtty.h 2007-02-28 03:51:25.000000000 +0100
@@ -71,4 +71,10 @@
#define STR_CTRL_INTERFACE 0x06
#define STR_COUNT 0x07
@@ -1528,3 +1531,17 @@
+#endif
+
#endif
+Index: u-boot/include/configs/qt2410.h
+===================================================================
+--- u-boot.orig/include/configs/qt2410.h 2007-02-28 03:51:24.000000000 +0100
++++ u-boot/include/configs/qt2410.h 2007-02-28 03:51:25.000000000 +0100
+@@ -199,7 +199,8 @@
+ #define CONFIG_USBD_PRODUCT_NAME "QT2410 Bootloader " U_BOOT_VERSION
+ #define CONFIG_EXTRA_ENV_SETTINGS "usbtty=cdc_acm\0"
+ #define CONFIG_USBD_DFU 1
+-#define CONFIG_USBD_DFU_XFER_SIZE 0x4000
++#define CONFIG_USBD_DFU_XFER_SIZE 4096
++#define CONFIG_USBD_DFU_INTERFACE 2
+
+ /*-----------------------------------------------------------------------
+ * Physical Memory Map
More information about the commitlog
mailing list