X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fusb.h;h=9a2e72c9d01528d7b5679ba9cb35ecfeba5718d1;hb=af5d100e8d5cd49d69d52d20f1181eb06ddb4ddf;hp=4e1539fa8820684b7c38e2cf00c283d7b6eeb07d;hpb=d61ea14885631e58a25feaa81ee82eb464c62d6a;p=oweals%2Fu-boot.git diff --git a/include/usb.h b/include/usb.h index 4e1539fa88..9a2e72c9d0 100644 --- a/include/usb.h +++ b/include/usb.h @@ -129,6 +129,13 @@ struct usb_config_descriptor { struct usb_interface_descriptor if_desc[USB_MAXINTERFACES]; } __attribute__ ((packed)); +enum { + /* Maximum packet size; encoded as 0,1,2,3 = 8,16,32,64 */ + PACKET_SIZE_8 = 0, + PACKET_SIZE_16 = 1, + PACKET_SIZE_32 = 2, + PACKET_SIZE_64 = 3, +}; struct usb_device { int devnum; /* Device number on USB bus */ @@ -137,9 +144,12 @@ struct usb_device { char prod[32]; /* product */ char serial[32]; /* serial number */ - 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; */ + /* Maximum packet size; one of: PACKET_SIZE_* */ + int maxpacketsize; + /* one bit for each endpoint ([0] = IN, [1] = OUT) */ + unsigned int toggle[2]; + /* endpoint halts; one bit per endpoint # & direction; */ + unsigned int halted[2]; /* [0] = IN, [1] = OUT */ int epmaxpacketin[16]; /* INput endpoint specific maximums */ int epmaxpacketout[16]; /* OUTput endpoint specific maximums */ @@ -171,7 +181,7 @@ struct usb_device { #if defined(CONFIG_USB_UHCI) || defined(CONFIG_USB_OHCI) || \ defined(CONFIG_USB_OHCI_NEW) || defined (CONFIG_USB_SL811HS) || \ - defined(CONFIG_USB_ISP116X_HCD) + defined(CONFIG_USB_ISP116X_HCD) || defined(CONFIG_USB_R8A66597_HCD) int usb_lowlevel_init(void); int usb_lowlevel_stop(void); @@ -195,7 +205,7 @@ void usb_event_poll(void); #define USB_MAX_STOR_DEV 5 block_dev_desc_t *usb_stor_get_dev(int index); int usb_stor_scan(int mode); -void usb_stor_info(void); +int usb_stor_info(void); #endif