usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting
Subsystems (2)
PATCH v2 1/1 usb: dwc2: Clear GUSBCFG.UsbTrdTim before setting
The USBTRDTIM field needs to be cleared before setting a new value. Otherwise it will result in an incorrect value if phyif == GUSBCFG_PHYIF8.
--- drivers/usb/dwc2/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc2/gadget.c +2 -2
@@ -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 ;
Signature · 1 line
2.9.3
Hi,
Quoted 6 lines · 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 Ib3e33cf4fd15ada41dc070ff7b93858daafbd10fSigned-off-by Pengcheng Li <[email protected]>Acked-by John Youn <[email protected]>
which commit are you fixing? Seems like you're missing a:
line here. Also, you need to remove Gerritisms from commit log ;-)
Signature · 1 line
balbi
Quoted 13 lines
-----Original Message-----
From: Felipe Balbi [mailto:[email protected]]
Sent: Monday, October 17, 2016 5:37 PM
To: Lipengcheng; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Xuejiancheng; Lidongpo; Caizhiyong; Lipengcheng
Subject: Re: [PATCH V2]usb: dwc2: Clear GUSBCFG.UsbTrdTim before settingHi,
Pengcheng Li <[email protected]> writes:
Quoted 9 lines
Quoted 6 lines
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 Ib3e33cf4fd15ada41dc070ff7b93858daafbd10fSigned-off-by Pengcheng Li <[email protected]>Acked-by John Youn <[email protected]>which commit are you fixing? Seems like you're missing a:
commit c45574ff02d1d1f35a6bf4b8ad051fc06c001fc7.
Quoted 4 lines
Fixes foobar ....line here. Also, you need to remove Gerritisms from commit log ;-)
Ok, I will remove at the next patch.
Quoted 2 lines
--
Balbi
Best Regards
Pengcheng Li