X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fusb%2Fmusb%2Fmusbdefs.h;h=d059be34ff0a6d5bca9ea8f5add3414f18e3c5a4;hb=68a37991fe438a5ec061e49278917e9f75e36931;hp=59b2eb978dcbca9dc819eff02406465835ef2380;hpb=3e667a05130cfa405a925d9198eb65297d503315;p=linux-2.6-omap-h63xx.git diff --git a/drivers/usb/musb/musbdefs.h b/drivers/usb/musb/musbdefs.h index 59b2eb978dc..d059be34ff0 100644 --- a/drivers/usb/musb/musbdefs.h +++ b/drivers/usb/musb/musbdefs.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -176,10 +176,13 @@ static inline void musb_host_rx(struct musb *m, u8 e) {} #endif /* host side ep0 states */ -#define MGC_END0_START 0x0 -#define MGC_END0_OUT 0x2 -#define MGC_END0_IN 0x4 -#define MGC_END0_STATUS 0x8 +enum musb_h_ep0_state { + MGC_END0_IDLE, + MGC_END0_START, /* expect ack of setup */ + MGC_END0_IN, /* expect IN DATA */ + MGC_END0_OUT, /* expect ack of OUT DATA */ + MGC_END0_STATUS, /* expect ack of STATUS */ +} __attribute__ ((packed)); /* peripheral side ep0 states */ enum musb_g_ep0_state { @@ -347,7 +350,7 @@ struct musb { u32 port1_status; unsigned long rh_timer; - u8 bEnd0Stage; /* end0 stage while in host */ + enum musb_h_ep0_state bEnd0Stage; /* bulk traffic normally dedicates endpoint hardware, and each * direction has its own ring of host side endpoints. @@ -402,7 +405,7 @@ struct musb { u8 min_power; /* vbus for periph, in mA/2 */ /* active means connected and not suspended */ - unsigned is_active:1; + unsigned is_active:1; unsigned bIsMultipoint:1; unsigned bIsHost:1; @@ -430,8 +433,19 @@ struct musb { #endif #ifdef CONFIG_USB_GADGET_MUSB_HDRC - unsigned bIsSelfPowered:1; - unsigned bMayWakeup:1; + /* is_suspended means USB B_PERIPHERAL suspend */ + unsigned is_suspended:1; + + /* may_wakeup means remote wakeup is enabled */ + unsigned may_wakeup:1; + + /* is_self_powered is reported in device status and the + * config descriptor. is_bus_powered means B_PERIPHERAL + * draws some VBUS current; both can be true. + */ + unsigned is_self_powered:1; + unsigned is_bus_powered:1; + unsigned bSetAddress:1; unsigned bTestMode:1; unsigned softconnect:1;