usb: dwc3: Track DWC_usb31 VERSIONTYPE
PATCH v5 1/3 usb: dwc3: Track DWC_usb31 VERSIONTYPE
Hi,
Quoted 36 lines · Thinh Nguyen
Add a new field to dwc3 structure to track VERSIONTYPE. The VERSIONTYPE is represented in ASCII in the 32-bit VERSIONTYPE register. In
DWC_usb31, sub releases for each version are tracked with VERSIONTYPE such as "ea01" and "ea02".Signed-off-by Thinh Nguyen <[email protected]>--- drivers/usb/dwc3/core.c | 1 + drivers/usb/dwc3/core.h | 5 +++++ 2 files changed, 6 insertions(+)drivers/usb/dwc3/core.c +1
-0@@ -702,6 +702,7 @@ static bool dwc3_core_is_valid(struct dwc3 *dwc)/* Detected DWC_usb31 IP */ dwc->revision =dwc3_readl (dwc->regs,DWC3_VER_NUMBER ); dwc->revision |=DWC3_REVISION_IS_DWC31 ; + dwc->version_type =dwc3_readl (dwc->regs,DWC3_VER_TYPE ); }else {return false; }drivers/usb/dwc3/core.h +1
-0@@ -918,6 +918,7 @@ struct dwc3_scratchpad_array {* @u1u2: only used on revisions <1.83a for workaround * @maximum_speed: maximum speed requested (mainly for testing purposes) * @revision: revision register contents +* @version_type: VERSIONTYPE register contents, a sub release of a revision * @dr_mode: requested mode of operation * @current_dr_role: current role of operation when in dual-role mode * @desired_dr_role: desired role of operation when in dual-role mode
drivers/usb/dwc3/core.h struct dwc3 { · line 1110
Quoted 6 lines
drivers/usb/dwc3/core.h +3
-0@@ -1104,6 +1105,10 @@ struct dwc3 {#define DWC3_USB31_REVISION_110A (0x3131302a | DWC3_REVISION_IS_DWC31)#define DWC3_USB31_REVISION_120A (0x3132302a | DWC3_REVISION_IS_DWC31) +u32 version_type; + +#define DWC31_VERSIONTYPE_EA01 0x65613031
on patch 2 you talk about ea06, why don't you have a define for all those version types?