From: Udipto Goswami <quic_ugoswami@quicinc.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-usb@vger.kernel.org>
Cc: John Youn <John.Youn@synopsys.com>
Subject: Re: [PATCH v2] usb: dwc3: core: Deprecate GCTL.CORESOFTRESET
Date: Mon, 27 Jun 2022 15:58:42 +0530 [thread overview]
Message-ID: <400a84d5-4d23-bf67-4a80-773bf2129da0@quicinc.com> (raw)
In-Reply-To: <9df529fde6e55f5508321b6bc26e92848044ef2b.1655338967.git.Thinh.Nguyen@synopsys.com>
Hi Thinh,
On 6/16/22 5:54 AM, Thinh Nguyen wrote:
> Synopsys IP DWC_usb32 and DWC_usb31 version 1.90a and above deprecated
> GCTL.CORESOFTRESET. The DRD mode switching flow is updated to remove the
> GCTL soft reset. Add version checks to prevent using deprecated setting
> in mode switching flow.
>
> Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> ---
> Changes in v2:
> - Rebase on Greg's usb-testing branch.
>
> drivers/usb/dwc3/core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 2c12bbbcd55c..91278d2a72b8 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -159,7 +159,8 @@ static void __dwc3_set_mode(struct work_struct *work)
> }
>
> /* For DRD host or device mode only */
> - if (dwc->desired_dr_role != DWC3_GCTL_PRTCAP_OTG) {
> + if ((DWC3_IP_IS(DWC3) || DWC3_VER_IS_PRIOR(DWC31, 190A)) &&
just curious, i might be wrong here but, did you meant to use
(DWC3_IP_IS(DWC3) && DWC3_VER_IS_PRIOR(DWC31, 190A) ?
because from the commit text it looks like we are trying to avoid doing GCTL core soft reset for GEN1 above 190A
and GEN2. But the check fails for GEN1 controller with version above 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);
>
> base-commit: 235a6d80f021d9c3bb5652fb6b19d092a7339248
Thanks,
-Udipto
next prev parent reply other threads:[~2022-06-27 10:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 0:24 [PATCH v2] usb: dwc3: core: Deprecate GCTL.CORESOFTRESET Thinh Nguyen
2022-06-27 10:28 ` Udipto Goswami [this message]
2022-06-27 16:56 ` Thinh Nguyen
2022-06-28 6:43 ` Udipto Goswami
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=400a84d5-4d23-bf67-4a80-773bf2129da0@quicinc.com \
--to=quic_ugoswami@quicinc.com \
--cc=John.Youn@synopsys.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.