]> git.sur5r.net Git - u-boot/blobdiff - include/usb.h
Add configuration for wtk board
[u-boot] / include / usb.h
index c3cc8903ad5faaa480a2628b55d98228c5e8c211..0008a9a7457684812d45a4336fb449239a2771ab 100644 (file)
@@ -59,7 +59,6 @@ struct devrequest {
 } __attribute__ ((packed));
 
 
-
 /* All standard descriptors have these 2 fields in common */
 struct usb_descriptor_header {
        unsigned char  bLength;
@@ -141,7 +140,7 @@ struct usb_device {
        int maxpacketsize;                  /* Maximum packet size; encoded as 0,1,2,3 = 8,16,32,64 */
        unsigned int toggle[2];         /* one bit for each endpoint ([0] = IN, [1] = OUT) */
        unsigned int halted[2];         /* endpoint halts; one bit per endpoint # & direction; */
-                            /* [0] = IN, [1] = OUT */
+                           /* [0] = IN, [1] = OUT */
        int epmaxpacketin[16];          /* INput endpoint specific maximums */
        int epmaxpacketout[16];         /* OUTput endpoint specific maximums */
 
@@ -170,7 +169,7 @@ struct usb_device {
  * this is how the lowlevel part communicate with the outer world
  */
 
-#ifdef CONFIG_USB_UHCI
+#if defined(CONFIG_USB_UHCI) || defined(CONFIG_USB_OHCI)
 int usb_lowlevel_init(void);
 int usb_lowlevel_stop(void);
 int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,int transfer_len);
@@ -229,6 +228,11 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size);
 int usb_set_interface(struct usb_device *dev, int interface, int alternate);
 
 /* big endian -> little endian conversion */
+/* some CPUs are already little endian e.g. the ARM920T */
+#ifdef LITTLEENDIAN
+#define swap_16(x) ((unsigned short)(x))
+#define swap_32(x) ((unsigned long)(x))
+#else
 #define swap_16(x) \
        ((unsigned short)( \
                (((unsigned short)(x) & (unsigned short)0x00ffU) << 8) | \
@@ -239,6 +243,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate);
                (((unsigned long)(x) & (unsigned long)0x0000ff00UL) <<  8) | \
                (((unsigned long)(x) & (unsigned long)0x00ff0000UL) >>  8) | \
                (((unsigned long)(x) & (unsigned long)0xff000000UL) >> 24) ))
+#endif /* LITTLEENDIAN */
 
 /*
  * Calling this entity a "pipe" is glorifying it. A USB pipe