* [PATCH V2]usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting
@ 2016-09-23 12:34 Pengcheng Li
2016-10-17 9:37 ` Felipe Balbi
0 siblings, 1 reply; 3+ messages in thread
From: Pengcheng Li @ 2016-09-23 12:34 UTC (permalink / raw)
To: johnyoun
Cc: gregkh, linux-usb, linux-kernel, xuejiancheng, lidongpo,
caizhiyong, Pengcheng Li
The USBTRDTIM field needs to be cleared before setting a new value.
Otherwise it will result in an incorrect value if phyif == GUSBCFG_PHYIF8.
Change-Id: Ib3e33cf4fd15ada41dc070ff7b93858daafbd10f
Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>
Acked-by: John Youn <johnyoun@synopsys.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;
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2]usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting
2016-09-23 12:34 [PATCH V2]usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting Pengcheng Li
@ 2016-10-17 9:37 ` Felipe Balbi
2016-10-22 1:44 ` Lipengcheng
0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2016-10-17 9:37 UTC (permalink / raw)
To: Pengcheng Li, johnyoun
Cc: gregkh, linux-usb, linux-kernel, xuejiancheng, lidongpo,
caizhiyong, Pengcheng Li
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
Hi,
Pengcheng Li <lpc.li@hisilicon.com> writes:
> The USBTRDTIM field needs to be cleared before setting a new value.
> Otherwise it will result in an incorrect value if phyif == GUSBCFG_PHYIF8.
>
> Change-Id: Ib3e33cf4fd15ada41dc070ff7b93858daafbd10f
> Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>
> Acked-by: John Youn <johnyoun@synopsys.com>
which commit are you fixing? Seems like you're missing a:
Fixes: foobar ....
line here. Also, you need to remove Gerritisms from commit log ;-)
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH V2]usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting
2016-10-17 9:37 ` Felipe Balbi
@ 2016-10-22 1:44 ` Lipengcheng
0 siblings, 0 replies; 3+ messages in thread
From: Lipengcheng @ 2016-10-22 1:44 UTC (permalink / raw)
To: Felipe Balbi, johnyoun
Cc: gregkh, linux-usb, linux-kernel, Xuejiancheng, Lidongpo, Caizhiyong
> -----Original Message-----
> From: Felipe Balbi [mailto:felipe.balbi@linux.intel.com]
> Sent: Monday, October 17, 2016 5:37 PM
> To: Lipengcheng; johnyoun@synopsys.com
> Cc: gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Xuejiancheng; Lidongpo; Caizhiyong; Lipengcheng
> Subject: Re: [PATCH V2]usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting
>
>
> Hi,
>
> Pengcheng Li <lpc.li@hisilicon.com> writes:
> > The USBTRDTIM field needs to be cleared before setting a new value.
> > Otherwise it will result in an incorrect value if phyif == GUSBCFG_PHYIF8.
> >
> > Change-Id: Ib3e33cf4fd15ada41dc070ff7b93858daafbd10f
> > Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>
> > Acked-by: John Youn <johnyoun@synopsys.com>
>
> which commit are you fixing? Seems like you're missing a:
>
commit c45574ff02d1d1f35a6bf4b8ad051fc06c001fc7.
> Fixes: foobar ....
>
> line here. Also, you need to remove Gerritisms from commit log ;-)
>
Ok, I will remove at the next patch.
> --
> Balbi
Best Regards
Pengcheng Li
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-22 1:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 12:34 [PATCH V2]usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting Pengcheng Li
2016-10-17 9:37 ` Felipe Balbi
2016-10-22 1:44 ` Lipengcheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).