Skip to content

Commit

Permalink
Revert "FROMGIT: usb: dwc3: core: Do not perform GCTL_CORE_SOFTRESET …
Browse files Browse the repository at this point in the history
…during bootup"

This reverts commit c301d14.

This commit causes the OTG port always working as device after boot regardless
of the status of OTG physical switch.

Rockchip Redmine: https://redmine.rock-chips.com/issues/429397

Signed-off-by: ZHANG Yuntian <[email protected]>
  • Loading branch information
RadxaYuntian committed Aug 14, 2023
1 parent 7a4a688 commit c75f70a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,9 @@ static void __dwc3_set_mode(struct work_struct *work)
break;
}

/*
* When current_dr_role is not set, there's no role switching.
* Only perform GCTL.CoreSoftReset when there's DRD role switching.
*/
if (dwc->current_dr_role && ((DWC3_IP_IS(DWC3) ||
DWC3_VER_IS_PRIOR(DWC31, 190A)) &&
dwc->desired_dr_role != DWC3_GCTL_PRTCAP_OTG)) {
/* For DRD host or device mode only */
if ((DWC3_IP_IS(DWC3) || DWC3_VER_IS_PRIOR(DWC31, 190A)) &&
dwc->desired_dr_role != DWC3_GCTL_PRTCAP_OTG) {
reg = dwc3_readl(dwc->regs, DWC3_GCTL);
reg |= DWC3_GCTL_CORESOFTRESET;
dwc3_writel(dwc->regs, DWC3_GCTL, reg);
Expand Down

0 comments on commit c75f70a

Please sign in to comment.