Changeset 2874
- Timestamp:
- 08/31/07 18:45:56 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch
r2838 r2874 18 18 --- /dev/null 19 19 +++ u-boot/drivers/usbdcore_s3c2410.c 20 @@ -0,0 +1,7 30@@20 @@ -0,0 +1,751 @@ 21 21 +/* S3C2410 USB Device Controller Driver for u-boot 22 22 + * … … 67 67 +#include "usbdcore_ep0.h" 68 68 +#include <usb_cdc_acm.h> 69 + 70 +static void debug_urb_buffer(char *prefix, struct usb_endpoint_instance *ep) 71 +{ 72 +#ifdef DEBUG 73 + int num; 74 + static char buf[128]; 75 + 76 + if (!ep->tx_urb) { 77 + serial_printf("no tx_urb\n"); 78 + return; 79 + } 80 + 81 + num = MIN(ep->tx_urb->actual_length - ep->sent, ep->tx_packetSize); 82 + 83 + memset(buf, 0, sizeof(buf)); 84 + strncpy(buf, ep->tx_urb->buffer + ep->sent, num); 85 + 86 + serial_printf("%s(%d:%s)\n", prefix, num, buf); 87 +#endif 88 +} 89 + 69 90 + 70 91 +enum ep0_state { … … 391 412 + } else { 392 413 + /* write actual data to fifo */ 393 + debug ("TX_DATA ");414 + debug_urb_buffer("TX_DATA", endpoint); 394 415 + s3c2410_write_noniso_tx_fifo(endpoint); 395 416 + outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG); … … 524 545 + if (endpoint->tx_urb) { 525 546 + u32 ep_csr1; 526 + debug ("We have an URB, transmitting\n");547 + debug_urb_buffer("We have an URB, transmitting", endpoint); 527 548 + 528 549 + s3c2410_write_noniso_tx_fifo(endpoint);
Note: See TracChangeset
for help on using the changeset viewer.
