Changeset 2874


Ignore:
Timestamp:
08/31/07 18:45:56 (6 years ago)
Author:
laforge
Message:

add some additional debugging code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch

    r2838 r2874  
    1818--- /dev/null 
    1919+++ u-boot/drivers/usbdcore_s3c2410.c 
    20 @@ -0,0 +1,730 @@ 
     20@@ -0,0 +1,751 @@ 
    2121+/* S3C2410 USB Device Controller Driver for u-boot 
    2222+ * 
     
    6767+#include "usbdcore_ep0.h" 
    6868+#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+ 
    6990+ 
    7091+enum ep0_state { 
     
    391412+                       } else { 
    392413+                               /* write actual data to fifo */ 
    393 +                               debug("TX_DATA "); 
     414+                               debug_urb_buffer("TX_DATA", endpoint); 
    394415+                               s3c2410_write_noniso_tx_fifo(endpoint); 
    395416+                               outl(ep_csr1|S3C2410_UDC_ICSR1_PKTRDY, S3C2410_UDC_IN_CSR1_REG); 
     
    524545+       if (endpoint->tx_urb) { 
    525546+               u32 ep_csr1; 
    526 +               debug("We have an URB, transmitting\n"); 
     547+               debug_urb_buffer("We have an URB, transmitting", endpoint); 
    527548+ 
    528549+               s3c2410_write_noniso_tx_fifo(endpoint); 
Note: See TracChangeset for help on using the changeset viewer.