diff options
author | Wolfgang Denk <wd@denx.de> | 2007-08-09 23:17:32 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-08-09 23:17:32 +0200 |
commit | 19901c6320a07dfa33814c9cdb5b9f6511765079 (patch) | |
tree | d85a6eec1ec2a4d94c61244ab85d72368305726e /include/usb.h | |
parent | 2c4faea84f3d96d674e3c065e1f220b20c8930c0 (diff) | |
parent | 78549bbf44bd2c8d1a0730fb068836071751afaa (diff) | |
download | u-boot-imx-19901c6320a07dfa33814c9cdb5b9f6511765079.zip u-boot-imx-19901c6320a07dfa33814c9cdb5b9f6511765079.tar.gz u-boot-imx-19901c6320a07dfa33814c9cdb5b9f6511765079.tar.bz2 |
Merge with /home/wd/git/u-boot/custodian/u-boot-usb
Diffstat (limited to 'include/usb.h')
-rw-r--r-- | include/usb.h | 21 |
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 */ /* |