diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2015-02-23 16:10:00 +0300 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-04-14 06:48:09 +0300 |
commit | b6d959acaae08fa217f539245893c663d63a8b7a (patch) | |
tree | 10b9bbf71115322fb41fa7fc4e1a6a1c9c4561d2 /drivers/usb/dwc3/core.h | |
parent | 72e7c32fe4dd21aecd1c37eb7f338613b18af148 (diff) | |
download | u-boot-b6d959acaae08fa217f539245893c663d63a8b7a.tar.xz |
usb: dwc3: ep0: make dwc3 ep0 build in uboot
*) Changed the included header files to that used in u-boot.
*) added dwc3_ep_event_string() used in ep0.c
*) Fixed other misc warnings
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'drivers/usb/dwc3/core.h')
-rw-r--r-- | drivers/usb/dwc3/core.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 97f71ad93f..0ffcb7d733 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -841,6 +841,30 @@ struct dwc3_event_type { #define DWC3_DEPEVT_EPCMDCMPLT 0x07 /** + * dwc3_ep_event_string - returns event name + * @event: then event code + */ +static inline const char *dwc3_ep_event_string(u8 event) +{ + switch (event) { + case DWC3_DEPEVT_XFERCOMPLETE: + return "Transfer Complete"; + case DWC3_DEPEVT_XFERINPROGRESS: + return "Transfer In-Progress"; + case DWC3_DEPEVT_XFERNOTREADY: + return "Transfer Not Ready"; + case DWC3_DEPEVT_RXTXFIFOEVT: + return "FIFO"; + case DWC3_DEPEVT_STREAMEVT: + return "Stream"; + case DWC3_DEPEVT_EPCMDCMPLT: + return "Endpoint Command Complete"; + } + + return "UNKNOWN"; +} + +/** * struct dwc3_event_depvt - Device Endpoint Events * @one_bit: indicates this is an endpoint event (not used) * @endpoint_number: number of the endpoint |