r669 - trunk/src/target/u-boot/patches

laforge at sita.openmoko.org laforge at sita.openmoko.org
Mon Feb 5 14:55:20 CET 2007


Author: laforge
Date: 2007-02-05 14:55:19 +0100 (Mon, 05 Feb 2007)
New Revision: 669

Modified:
   trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch
Log:
First working version of uboot usb serial support. You have to do

setenv usbtty cdc_acm
setenv stderr usbtty
setenv stdout usbtty
setenv stdin usbtty

in order to use it.


Modified: trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch	2007-02-05 09:34:59 UTC (rev 668)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch	2007-02-05 13:55:19 UTC (rev 669)
@@ -16,14 +16,15 @@
 Index: u-boot.git/drivers/usbdcore_s3c2410.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ u-boot.git/drivers/usbdcore_s3c2410.c	2007-02-04 22:04:04.000000000 +0100
-@@ -0,0 +1,759 @@
++++ u-boot.git/drivers/usbdcore_s3c2410.c	2007-02-05 14:51:57.000000000 +0100
+@@ -0,0 +1,700 @@
 +/* S3C2410 USB Device Controller Driver for u-boot
 + *
 + * (C) Copyright 2007 by OpenMoko, Inc.
 + * Author: Harald Welte <laforge at openmoko.org>
 + *
-+ * based on u-boot's udc_omap1510.c and linux' s3c2410_udc.c
++ * based on Linux' s3c2410_udc.c, which is
++ * Copyright (C) 2004-2006 Herbert Pötzl - Arnaud Patard
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -51,15 +52,15 @@
 +#include "usbdcore.h"
 +#include "usbdcore_s3c2410.h"
 +#include "usbdcore_ep0.h"
++#include <usb_cdc_acm.h>
 +
 +
-+/* Some kind of debugging output... */
-+#if 1
-+#define UDCDBG(str)
-+#define UDCDBGA(fmt,args...)
-+#else  /* The bugs still exists... */
++#if 0
 +#define UDCDBG(str) serial_printf("[%s] %s:%d: " str "\n", __FILE__,__FUNCTION__,__LINE__)
 +#define UDCDBGA(fmt,args...) serial_printf("[%s] %s:%d: " fmt "\n", __FILE__,__FUNCTION__,__LINE__, ##args)
++#else
++#define UDCDBG(str)
++#define UDCDBGA(fmt,args...)
 +#endif
 +
 +enum ep0_state {
@@ -73,26 +74,7 @@
 +static struct urb *ep0_urb = NULL;
 +
 +static struct usb_device_instance *udc_device;	/* Used in interrupt handler */
-+static u16 udc_devstat = 0;	/* UDC status (DEVSTAT) */
-+static u32 udc_interrupts = 0;
 +
-+static void udc_stall_ep (unsigned int ep_addr);
-+
-+static struct usb_endpoint_instance *s3c2410_find_ep (int ep)
-+{
-+	int i;
-+
-+	for (i = 0; i < udc_device->bus->max_endpoints; i++) {
-+		if (udc_device->bus->endpoint_array[i].endpoint_address == ep)
-+			return &udc_device->bus->endpoint_array[i];
-+	}
-+	return NULL;
-+}
-+
-+/* ************************************************************************** */
-+/* IO
-+ */
-+
 +static inline int fifo_count_out(void)
 +{
 +	int tmp;
@@ -118,10 +100,8 @@
 +	unsigned int ep = endpoint->endpoint_address & 0x7f;
 +	unsigned long fifo_reg = ep_fifo_reg[ep];
 +
-+#if 1
-+	UDCDBGA("write_noniso_tx_fifo(ep=%d, fifo_reg=0x%x, len=%d, sent=%d, last=%d",
-+		ep, fifo_reg, urb->actual_length, endpoint->sent, endpoint->last);
-+#endif
++	/* WARNING: don't ever put serial debug printf's in non-error codepaths
++	 * here, it is called from the time critical EP0 codepath ! */
 +
 +	if (!urb || ep >= S3C2410_UDC_NUM_ENDPOINTS) {
 +		serial_printf("no urb or wrong endpoint\n");
@@ -139,39 +119,22 @@
 +	endpoint->last = last;
 +
 +	if (endpoint->sent + last < urb->actual_length) {
-+		//serial_putc('I');
-+		//UDCDBG("INCOMPLETE");
++		/* not all data has been transmitted so far */
 +		return 0;
 +	}
 +
 +	if (last == endpoint->tx_packetSize) {
 +		/* we need to send one more packet (ZLP) */
-+		//serial_putc('Z');
-+		//UDCDBG("zero-pending");
 +		return 0;
 +	}
 +
-+	//serial_putc('C');
-+	//UDCDBG("complete");
 +	return 1;
 +}
 +
 +
 +static void s3c2410_deconfigure_device (void)
 +{
-+#if 0
-+	int epnum;
-+
-+	UDCDBG ("clear Cfg_Lock");
-+	outw (inw (UDC_SYSCON1) & ~UDC_Cfg_Lock, UDC_SYSCON1);
-+	UDCREG (UDC_SYSCON1);
-+
-+	/* deconfigure all endpoints */
-+	for (epnum = 1; epnum <= 15; epnum++) {
-+		outw (0, UDC_EP_RX (epnum));
-+		outw (0, UDC_EP_TX (epnum));
-+	}
-+#endif
++	/* FIXME: Implement this */
 +}
 +
 +static void s3c2410_configure_device (struct usb_device_instance *device)
@@ -217,9 +180,6 @@
 +	S3C2410_UDC_SETIX(0);
 +	ep0csr = inl(S3C2410_UDC_IN_CSR1_REG);
 +
-+	UDCDBGA("-> Entering EP0 handler, EP0_CSR=0x%x, EP0_state=%u", ep0csr,
-+		ep0->state);
-+
 +	/* clear stall status */
 +	if (ep0csr & S3C2410_UDC_EP0_CSR_SENTSTL) {
 +	    	UDCDBG("Clearing SENT_STALL");
@@ -237,6 +197,10 @@
 +		return;
 +	}
 +
++	/* Don't ever put [serial] debugging in non-error codepaths here, it
++	 * will violate the tight timing constraints of this USB Device
++	 * controller (and lead to bus enumeration failures) */
++
 +	switch (ep0->state) {
 +	case EP0_IDLE:
 +		if (ep0csr & S3C2410_UDC_EP0_CSR_OPKRDY) {
@@ -271,42 +235,58 @@
 +					usbd_device_event_irq (udc_device, DEVICE_DE_CONFIGURED, 0);
 +				else
 +					usbd_device_event_irq (udc_device, DEVICE_CONFIGURED, 0);
++				set_ep0_de_out();
 +				break;
 +			case USB_REQ_SET_ADDRESS:
 +				udc_set_address(udc_device->address);
++				usbd_device_event_irq (udc_device, DEVICE_ADDRESS_ASSIGNED, 0);
++				set_ep0_de_out();
 +				break;
++			case ACM_SET_LINE_ENCODING:
++				/* This is an ugly hack for blocking receive of
++				 * one specific control out request with data phase */
++				clear_ep0_opr();
++				do {
++					ep0csr = inl(S3C2410_UDC_IN_CSR1_REG);
++					if (ep0csr & S3C2410_UDC_EP0_CSR_OPKRDY) {
++						fifo_count = fifo_count_out();
++						while (fifo_count--)
++							inl(S3C2410_UDC_EP0_FIFO_REG);
++						clear_ep0_opr();
++						break;
++					}
++				} while (1);
++				break;
++			default:
++				clear_ep0_opr();
++				break;
 +			}
 +
 +			/* check whether we need to write/read */
 +			if ((ep0_urb->device_request.bmRequestType & USB_REQ_DIRECTION_MASK)
 +			    == USB_REQ_HOST2DEVICE) {
-+				UDCDBG("control write on EP0");
 +				/* FIXME: implement this. We now only do setup_out with
 +				 * empty data phase */
-+				//set_ep0_ss();
-+				//ep0->state = EP0_OUT_DATA_PHASE;
 +				set_ep0_de_out();
 +			} else {
 +				/* device -> host */
-+				UDCDBG("control read on EP0");
-+				clear_ep0_opr();
 +
 +				ep0->tx_urb = ep0_urb;
 +				ep0->sent = ep0->last = 0;
 +
 +				if (s3c2410_write_noniso_tx_fifo(ep0)) {
 +					ep0->state = EP0_IDLE;
-+					//if (!inl(S3C2410_UDC_USB_INT_REG) & S3C2410_UDC_USBINT_RESET)
 +						set_ep0_de_in();
 +				} else {
 +					ep0->state = EP0_IN_DATA_PHASE;
 +					set_ep0_ipr();
 +#if 1
++					/* we currently do this blocking to make sure
++					 * to do this within the harsh timing constraints */
 +					do {
 +						ep0csr = inl(S3C2410_UDC_IN_CSR1_REG);
 +						if ((ep0csr & S3C2410_UDC_EP0_CSR_IPKRDY))
 +							continue;
-+						//serial_printf("csr0=0x%x\n", ep0csr);
 +
 +						ep0->sent += ep0->last;
 +						if (s3c2410_write_noniso_tx_fifo(ep0)) {
@@ -322,7 +302,6 @@
 +		}
 +		break;
 +	case EP0_IN_DATA_PHASE:
-+
 +		if (!(ep0csr & S3C2410_UDC_EP0_CSR_IPKRDY)) {
 +			ep0->sent += ep0->last;
 +
@@ -355,42 +334,50 @@
 +	struct urb *urb;
 +	u32 ep_csr1;
 +
-+	/* FIXME: implement data endpoint handling */
-+	UDCDBGA("for ep=%u", ep);
-+
 +	if (ep >= S3C2410_UDC_NUM_ENDPOINTS)
 +		return;
 +
 +	endpoint = &udc_device->bus->endpoint_array[ep];
 +
 +	S3C2410_UDC_SETIX(ep);
-+	ep_csr1 = inl(S3C2410_UDC_IN_CSR1_REG);
 +
 +	if (endpoint->endpoint_address & USB_DIR_IN) {
 +		/* IN transfer (device to host) */
++		ep_csr1 = inl(S3C2410_UDC_IN_CSR1_REG);
++		UDCDBGA("for ep=%u, CSR1=0x%x", ep, ep_csr1);
++
 +		urb = endpoint->tx_urb;
 +		if (ep_csr1 & S3C2410_UDC_ICSR1_SENTSTL) {
 +			/* Stall handshake */
++			UDCDBG("stall");
 +			outl(0x00, S3C2410_UDC_IN_CSR1_REG);
 +			return;
 +		}
-+		if (!(ep_csr1 & S3C2410_UDC_ICSR1_PKTRDY) && urb) {
++		if (!(ep_csr1 & S3C2410_UDC_ICSR1_PKTRDY) && urb &&
++		      urb->actual_length) {
++
++			UDCDBG("completing previously send data");
++			usbd_tx_complete(endpoint);
++
 +			/* push pending data into FIFO */
-+			if ((endpoint->last == endpoint->tx_packetSize) && 
++			if ((endpoint->last == endpoint->tx_packetSize) &&
 +			    (urb->actual_length - endpoint->sent - endpoint->last == 0)) {
 +				endpoint->sent += endpoint->last;
 +				/* Write 0 bytes of data (ZLP) */
++				UDCDBG("ZLP");
 +				outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG);
 +			} else {
 +				/* write actual data to fifo */
++				UDCDBG("TX_DATA");
 +				s3c2410_write_noniso_tx_fifo(endpoint);
 +				outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG);
-+
-+				usbd_tx_complete(endpoint);
 +			}
 +		}
 +	} else {
 +		/* OUT transfer (host to device) */
++		ep_csr1 = inl(S3C2410_UDC_OUT_CSR1_REG);
++		UDCDBGA("for ep=%u, CSR1=0x%x", ep, ep_csr1);
++
 +		urb = endpoint->rcv_urb;
 +		if (ep_csr1 & S3C2410_UDC_OCSR1_SENTSTL) {
 +			/* Stall handshake */
@@ -402,25 +389,28 @@
 +			u32 fifo_count = fifo_count_out();
 +			int is_last = 0;
 +			u32 i, urb_avail = urb->buffer_length - urb->actual_length;
-+			u8 *cp;
++			u8 *cp = urb->buffer + urb->actual_length;
 +
 +			if (fifo_count < endpoint->rcv_packetSize)
 +				is_last = 1;
 +
++			UDCDBGA("fifo_count=%u is_last=%, urb_avail=%u)",
++				fifo_count, is_last, urb_avail);
++
 +			if (fifo_count < urb_avail)
 +				urb_avail = fifo_count;
 +
 +			for (i = 0; i < urb_avail; i++)
 +				*cp++ = inb(ep_fifo_reg[ep]);
 +
-+			if (is_last) {
-+				outl(ep_csr1 & ~S3C2410_UDC_OCSR1_PKTRDY, 
++			if (is_last)
++				outl(ep_csr1 & ~S3C2410_UDC_OCSR1_PKTRDY,
 +				     S3C2410_UDC_OUT_CSR1_REG);
-+			}
++
 +			usbd_rcv_complete(endpoint, urb_avail, 0);
 +		}
 +	}
-+			
++
 +	urb = endpoint->rcv_urb;
 +}
 +
@@ -440,12 +430,10 @@
 +	u_int32_t usb_status = inl(S3C2410_UDC_USB_INT_REG);
 +	u_int32_t usbd_status = inl(S3C2410_UDC_EP_INT_REG);
 +
-+	UDCDBGA("< IRQ usbs=0x%02x, usbds=0x%02x start >", usb_status,
-+		usbd_status);
++	//UDCDBGA("< IRQ usbs=0x%02x, usbds=0x%02x start >", usb_status, usbd_status);
 +
 +	/* clear interrupts */
 +	outl(usb_status, S3C2410_UDC_USB_INT_REG);
-+	//outl(usbd_status, S3C2410_UDC_EP_INT_REG);
 +
 +	if (usb_status & S3C2410_UDC_USBINT_RESET) {
 +		//serial_putc('R');
@@ -486,7 +474,6 @@
 +		}
 +	}
 +	S3C2410_UDC_SETIX(save_idx);
-+	udc_interrupts++;
 +
 +	return usb_status | usbd_status;
 +}
@@ -506,19 +493,18 @@
 +	unsigned short epnum =
 +		endpoint->endpoint_address & USB_ENDPOINT_NUMBER_MASK;
 +
-+	UDCDBGA ("Starting transmit on ep %x", epnum);
++	UDCDBGA ("Entering for ep %x", epnum);
 +
 +	if (endpoint->tx_urb) {
-+#if 0
-+		/* select the endpoint FIFO */
-+		outw (UDC_EP_Sel | UDC_EP_Dir | epnum, UDC_EP_NUM);
-+		/* write data to FIFO */
-+		omap1510_write_noniso_tx_fifo (endpoint);
-+		/* enable tx FIFO to start transmission */
-+		outw (UDC_Set_FIFO_En, UDC_CTRL);
-+		/* deselect the endpoint FIFO */
-+		outw (UDC_EP_Dir | epnum, UDC_EP_NUM);
-+#endif
++		u32 ep_csr1;
++		UDCDBG ("We have an URB, transmitting");
++
++		s3c2410_write_noniso_tx_fifo(endpoint);
++
++		S3C2410_UDC_SETIX(epnum);
++
++		ep_csr1 = inl(S3C2410_UDC_IN_CSR1_REG);
++		outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG);
 +	}
 +}
 +
@@ -555,41 +541,6 @@
 +	return 0;
 +}
 +
-+/* Stall endpoint */
-+static void udc_stall_ep(unsigned int ep_num)
-+{
-+	UDCDBGA ("stall ep %d", ep_num);
-+
-+	S3C2410_UDC_SETIX(ep_num);
-+
-+	switch (ep_num) {
-+	case 0:
-+		outw(S3C2410_UDC_EP0_CSR_SENDSTL, S3C2410_UDC_EP0_CSR_REG);
-+		break;
-+		/* FIXME */
-+	default:
-+#if 0
-+	if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) {
-+		outw(ep_num)
-+		if (inw (UDC_EP_RX (ep_num)) & UDC_EPn_RX_Valid) {
-+			/* we have a valid rx endpoint, so halt it */
-+			outw (UDC_EP_Sel | ep_num, UDC_EP_NUM);
-+			outw (UDC_Set_Halt, UDC_CTRL);
-+			outw (ep_num, UDC_EP_NUM);
-+		}
-+	} else {
-+		if (inw (UDC_EP_TX (ep_num)) & UDC_EPn_TX_Valid) {
-+			/* we have a valid tx endpoint, so halt it */
-+			outw (UDC_EP_Sel | UDC_EP_Dir | ep_num, UDC_EP_NUM);
-+			outw (UDC_Set_Halt, UDC_CTRL);
-+			outw (ep_num, UDC_EP_NUM);
-+		}
-+	}
-+#endif
-+		break;
-+	}
-+}
-+
 +/*
 + * udc_setup_ep - setup endpoint
 + *
@@ -601,17 +552,28 @@
 +	int ep_addr = endpoint->endpoint_address;
 +	int packet_size;
 +	int attributes;
-+
 +	u_int32_t maxp;
 +
-+	if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) {
-+		/* IN endpoint */
-+		packet_size = endpoint->tx_packetSize;
-+		attributes = endpoint->tx_attributes;
-+	} else {
-+		/* OUT endpoint */
-+		packet_size = endpoint->rcv_packetSize;
-+		attributes = endpoint->rcv_attributes;
++	S3C2410_UDC_SETIX(ep);
++
++	if (ep) {
++		if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) {
++			/* IN endpoint */
++			outl(S3C2410_UDC_ICSR1_FFLUSH|S3C2410_UDC_ICSR1_CLRDT,
++			     S3C2410_UDC_IN_CSR1_REG);
++			outl(S3C2410_UDC_ICSR2_MODEIN, S3C2410_UDC_IN_CSR2_REG);
++			packet_size = endpoint->tx_packetSize;
++			attributes = endpoint->tx_attributes;
++		} else {
++			/* OUT endpoint */
++			outl(S3C2410_UDC_ICSR1_CLRDT, S3C2410_UDC_IN_CSR1_REG);
++			outl(0, S3C2410_UDC_IN_CSR2_REG);
++			outl(S3C2410_UDC_OCSR1_FFLUSH|S3C2410_UDC_OCSR1_CLRDT,
++			     S3C2410_UDC_OUT_CSR1_REG);
++			outl(0, S3C2410_UDC_OUT_CSR2_REG);
++			packet_size = endpoint->rcv_packetSize;
++			attributes = endpoint->rcv_attributes;
++		}
 +	}
 +
 +	if (packet_size <= 8)
@@ -627,7 +589,6 @@
 +		endpoint->endpoint_address, packet_size, maxp);
 +
 +	/* Set maximum packet size */
-+	S3C2410_UDC_SETIX(ep);
 +	writel(maxp, S3C2410_UDC_MAXP_REG);
 +
 +	return 0;
@@ -654,6 +615,10 @@
 +#if defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2)
 +	S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
 +
++	/* create a short disconnect, since we might come out of reset */
++	udc_disconnect();
++	udelay(10);
++
 +	// s3c2410_gpio_setpin(GTA01_GPIO_USB_PULLUP, 1);
 +	gpio->GPBDAT |= (1 << 9);
 +#endif
@@ -676,9 +641,6 @@
 +{
 +	UDCDBGA ("enable device %p, status %d", device, device->status);
 +
-+	/* initialize driver state variables */
-+	udc_devstat = 0;
-+
 +	/* Save the device structure pointer */
 +	udc_device = device;
 +
@@ -692,17 +654,6 @@
 +			       ep0_urb);
 +	}
 +
-+#ifdef FIXME
-+	/* The VBUS_MODE bit selects whether VBUS detection is done via
-+	 * software (1) or hardware (0).  When software detection is
-+	 * selected, VBUS_CTRL selects whether USB is not connected (0)
-+	 * or connected (1).
-+	 */
-+	outl (inl (FUNC_MUX_CTRL_0) | UDC_VBUS_CTRL | UDC_VBUS_MODE,
-+	      FUNC_MUX_CTRL_0);
-+	UDCREGL (FUNC_MUX_CTRL_0);
-+#endif
-+
 +	s3c2410_configure_device(device);
 +}
 +
@@ -713,17 +664,6 @@
 +
 +	s3c2410_deconfigure_device();
 +
-+#ifdef FIXME
-+	/* The VBUS_MODE bit selects whether VBUS detection is done via
-+	 * software (1) or hardware (0).  When software detection is
-+	 * selected, VBUS_CTRL selects whether USB is not connected (0)
-+	 * or connected (1).
-+	 */
-+	outl (inl (FUNC_MUX_CTRL_0) | UDC_VBUS_MODE, FUNC_MUX_CTRL_0);
-+	outl (inl (FUNC_MUX_CTRL_0) & ~UDC_VBUS_CTRL, FUNC_MUX_CTRL_0);
-+	UDCREGL (FUNC_MUX_CTRL_0);
-+#endif
-+
 +	/* Free ep0 URB */
 +	if (ep0_urb) {
 +		/*usbd_dealloc_urb(ep0_urb); */
@@ -770,11 +710,12 @@
 +
 +void udc_set_nak(int epid)
 +{
-+	
++	/* FIXME: implement this */
 +}
 +
 +void udc_unset_nak(int epid)
 +{
++	/* FIXME: implement this */
 +}
 +#endif
 Index: u-boot.git/drivers/usbdcore_s3c2410.h
@@ -1103,8 +1044,8 @@
 Index: u-boot.git/drivers/usbdcore_ep0.c
 ===================================================================
 --- u-boot.git.orig/drivers/usbdcore_ep0.c	2007-02-04 20:01:39.000000000 +0100
-+++ u-boot.git/drivers/usbdcore_ep0.c	2007-02-04 20:41:17.000000000 +0100
-@@ -43,10 +43,10 @@
++++ u-boot.git/drivers/usbdcore_ep0.c	2007-02-05 14:52:38.000000000 +0100
+@@ -43,7 +43,7 @@
  
  #include <common.h>
  
@@ -1112,11 +1053,7 @@
 +#if defined(CONFIG_USB_DEVICE)
  #include "usbdcore.h"
  
--#if 0
-+#if 1
- #define dbg_ep0(lvl,fmt,args...) serial_printf("[%s] %s:%d: "fmt"\n",__FILE__,__FUNCTION__,__LINE__,##args)
- #else
- #define dbg_ep0(lvl,fmt,args...)
+ #if 0
 @@ -190,6 +190,9 @@
  		return -1L;
  	}
@@ -1127,40 +1064,40 @@
  	/* setup tx urb */
  	urb->actual_length = 0;
  	cp = urb->buffer;
-@@ -206,6 +209,9 @@
+@@ -206,17 +209,8 @@
  			     usbd_device_device_descriptor (device, port))) {
  				return -1;
  			}
+-			/* copy descriptor for this device */
+-			copy_config (urb, device_descriptor,
+-				     sizeof (struct usb_device_descriptor),
+-				     max);
+-
+-			/* correct the correct control endpoint 0 max packet size into the descriptor */
+-			device_descriptor =
+-				(struct usb_device_descriptor *) urb->buffer;
+-			device_descriptor->bMaxPacketSize0 =
+-				urb->device->bus->maxpacketsize;
+-
 +			urb->buffer = device_descriptor;
 +			urb->actual_length = MIN(sizeof(*device_descriptor), max);
-+#if 0
- 			/* copy descriptor for this device */
- 			copy_config (urb, device_descriptor,
- 				     sizeof (struct usb_device_descriptor),
-@@ -217,6 +223,7 @@
- 			device_descriptor->bMaxPacketSize0 =
- 				urb->device->bus->maxpacketsize;
- 
-+#endif
  		}
  		/*dbg_ep0(3, "copied device configuration, actual_length: %x", urb->actual_length); */
  		break;
-@@ -250,9 +257,14 @@
+@@ -250,9 +244,9 @@
  					 index);
  				return -1;
  			}
+-			copy_config (urb, configuration_descriptor,
+-				     le16_to_cpu(configuration_descriptor->wTotalLength),
+-				     max);
 +			urb->buffer = configuration_descriptor;
-+			urb->actual_length = 
++			urb->actual_length =
 +				MIN(le16_to_cpu(configuration_descriptor->wTotalLength), max);
-+#if 0
- 			copy_config (urb, configuration_descriptor,
- 				     le16_to_cpu(configuration_descriptor->wTotalLength),
- 				     max);
-+#endif
  		}
  		break;
  
-@@ -543,7 +555,8 @@
+@@ -543,7 +537,8 @@
  			/*dbg_ep0(2, "address: %d %d %d", */
  			/*        request->wValue, le16_to_cpu(request->wValue), device->address); */
  
@@ -1191,21 +1128,6 @@
  /*-----------------------------------------------------------------------
   * Physical Memory Map
   */
-Index: u-boot.git/common/main.c
-===================================================================
---- u-boot.git.orig/common/main.c	2007-02-04 20:00:53.000000000 +0100
-+++ u-boot.git/common/main.c	2007-02-04 20:01:43.000000000 +0100
-@@ -962,6 +962,10 @@
- 			show_activity(0);
- 		}
- #endif
-+#ifdef CONFIG_USB_DEVICE__
-+		while (udc_irq_poll())
-+			;
-+#endif
- 		c = getc();
- 
- 		/*
 Index: u-boot.git/cpu/arm920t/s3c24x0/interrupts.c
 ===================================================================
 --- u-boot.git.orig/cpu/arm920t/s3c24x0/interrupts.c	2007-02-04 20:00:53.000000000 +0100





More information about the commitlog mailing list