From: John Youn <John.Youn@synopsys.com>
To: Pengcheng Li <lpc.li@hisilicon.com>,
"John.Youn@synopsys.com" <John.Youn@synopsys.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"xuejiancheng@hisilicon.com" <xuejiancheng@hisilicon.com>,
"lidongpo@hisilicon.com" <lidongpo@hisilicon.com>,
"caizhiyong@hisilicon.com" <caizhiyong@hisilicon.com>,
Felipe Balbi <balbi@kernel.org>
Subject: Re: [PATCH] usb: dwc2: add USBTrdTim to initial value
Date: Thu, 22 Sep 2016 17:58:06 -0700 [thread overview]
Message-ID: <c635749c-06a2-c072-3fe6-0673e4d8d735@synopsys.com> (raw)
In-Reply-To: <1474508357-119468-1-git-send-email-lpc.li@hisilicon.com>
On 9/21/2016 6:43 PM, Pengcheng Li wrote:
> After dwc2_core_reset,register is to the initial value, and the USBTrdTim
> vale is 0x5. If hsotg->phyif = GUSBCFG_PHYIF8, after the dwc2_writel,the
> value is 0xd.So we need to set the USBTrdTim to 0.
[++ Felipe]
Looks good. But please clean up the subject and message
Subject:
usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting
Description:
The USBTRDTIM field needs to be cleared before setting a new
value. Otherwise it will result in an incorrect value if
phyif == GUSBCFG_PHYIF8.
With that
Acked-by: John Youn <johnyoun@synopsys.com>
Thanks,
John
>
> Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>
> ---
> drivers/usb/dwc2/gadget.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index af46adf..9e52e4f 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -2531,7 +2531,7 @@ void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *hsotg,
> /* keep other bits untouched (so e.g. forced modes are not lost) */
> usbcfg = dwc2_readl(hsotg->regs + GUSBCFG);
> usbcfg &= ~(GUSBCFG_TOUTCAL_MASK | GUSBCFG_PHYIF16 | GUSBCFG_SRPCAP |
> - GUSBCFG_HNPCAP);
> + GUSBCFG_HNPCAP | GUSBCFG_USBTRDTIM_MASK);
>
> /* set the PLL on, remove the HNP/SRP and set the PHY */
> val = (hsotg->phyif == GUSBCFG_PHYIF8) ? 9 : 5;
> @@ -3413,7 +3413,7 @@ static void dwc2_hsotg_init(struct dwc2_hsotg *hsotg)
> /* keep other bits untouched (so e.g. forced modes are not lost) */
> usbcfg = dwc2_readl(hsotg->regs + GUSBCFG);
> usbcfg &= ~(GUSBCFG_TOUTCAL_MASK | GUSBCFG_PHYIF16 | GUSBCFG_SRPCAP |
> - GUSBCFG_HNPCAP);
> + GUSBCFG_HNPCAP | GUSBCFG_USBTRDTIM_MASK);
>
> /* set the PLL on, remove the HNP/SRP and set the PHY */
> trdtim = (hsotg->phyif == GUSBCFG_PHYIF8) ? 9 : 5;
>
prev parent reply other threads:[~2016-09-23 0:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 1:39 Pengcheng Li
2016-09-23 0:58 ` John Youn [this message]
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=c635749c-06a2-c072-3fe6-0673e4d8d735@synopsys.com \
--to=john.youn@synopsys.com \
--cc=balbi@kernel.org \
--cc=caizhiyong@hisilicon.com \
--cc=gregkh@linuxfoundation.org \
--cc=lidongpo@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lpc.li@hisilicon.com \
--cc=xuejiancheng@hisilicon.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®