summaryrefslogtreecommitdiff
path: root/include/usb.h
diff options
context:
space:
mode:
authorGerald Van Baren <vanbaren@cideas.com>2007-08-10 19:19:50 -0400
committerGerald Van Baren <vanbaren@cideas.com>2007-08-10 19:19:50 -0400
commit29eaae953476f2bba4d5c7ac097b96cd827c1dff (patch)
tree537faa4c04db58ee7b070b56bd7de7bd116092d3 /include/usb.h
parented8e5f362a2fc572eb9c1854f6c76c291b0f9a0f (diff)
parentfb56579ffe7ef3275b7036bb7b924e5a0d32bd70 (diff)
downloadu-boot-imx-29eaae953476f2bba4d5c7ac097b96cd827c1dff.zip
u-boot-imx-29eaae953476f2bba4d5c7ac097b96cd827c1dff.tar.gz
u-boot-imx-29eaae953476f2bba4d5c7ac097b96cd827c1dff.tar.bz2
Merge git://www.denx.de/git/u-boot
Diffstat (limited to 'include/usb.h')
-rw-r--r--include/usb.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/usb.h b/include/usb.h
index bf71554..4e1539f 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -169,7 +169,10 @@ struct usb_device {
* this is how the lowlevel part communicate with the outer world
*/
-#if defined(CONFIG_USB_UHCI) || defined(CONFIG_USB_OHCI) || defined (CONFIG_USB_SL811HS)
+#if defined(CONFIG_USB_UHCI) || defined(CONFIG_USB_OHCI) || \
+ defined(CONFIG_USB_OHCI_NEW) || defined (CONFIG_USB_SL811HS) || \
+ defined(CONFIG_USB_ISP116X_HCD)
+
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);
@@ -177,6 +180,7 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len,struct devrequest *setup);
int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len, int interval);
+void usb_event_poll(void);
/* Defines */
#define USB_UHCI_VEND_ID 0x8086
@@ -230,16 +234,12 @@ 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) \
+#define __swap_16(x) \
({ unsigned short x_ = (unsigned short)x; \
(unsigned short)( \
((x_ & 0x00FFU) << 8) | ((x_ & 0xFF00U) >> 8) ); \
})
-#define swap_32(x) \
+#define __swap_32(x) \
({ unsigned long x_ = (unsigned long)x; \
(unsigned long)( \
((x_ & 0x000000FFUL) << 24) | \
@@ -247,6 +247,13 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate);
((x_ & 0x00FF0000UL) >> 8) | \
((x_ & 0xFF000000UL) >> 24) ); \
})
+
+#ifdef LITTLEENDIAN
+# define swap_16(x) (x)
+# define swap_32(x) (x)
+#else
+# define swap_16(x) __swap_16(x)
+# define swap_32(x) __swap_32(x)
#endif /* LITTLEENDIAN */
/*