diff options
author | John Youn <johnyoun@synopsys.com> | 2016-11-10 17:08:48 -0800 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 13:54:20 +0200 |
commit | a987a906e95c4d80a364629d6bcb7cf69d2018e4 (patch) | |
tree | 200c33d8f71b2ce752964c6a7dd983fcdcd8f219 /drivers/usb/dwc3 | |
parent | 5f54c54b0ba835d547b86c65cc2076d62650ba77 (diff) | |
download | lwn-a987a906e95c4d80a364629d6bcb7cf69d2018e4.tar.gz lwn-a987a906e95c4d80a364629d6bcb7cf69d2018e4.zip |
usb: dwc3: Add a check for the DWC_usb3 core
Add a helper function to check if we are running on a DWC_usb3 core.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index b9903c6c3de4..354de247356a 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -1148,6 +1148,12 @@ struct dwc3_gadget_ep_cmd_params { void dwc3_set_mode(struct dwc3 *dwc, u32 mode); u32 dwc3_core_fifo_space(struct dwc3_ep *dep, u8 type); +/* check whether we are on the DWC_usb3 core */ +static inline bool dwc3_is_usb3(struct dwc3 *dwc) +{ + return !(dwc->revision & DWC3_REVISION_IS_DWC31); +} + /* check whether we are on the DWC_usb31 core */ static inline bool dwc3_is_usb31(struct dwc3 *dwc) { |