@@ -5389,20 +5389,34 @@ int dwc2_gadget_enter_hibernation(struct dwc2_hsotg *hsotg)
5389
5389
if (gusbcfg & GUSBCFG_ULPI_UTMI_SEL ) {
5390
5390
/* ULPI interface */
5391
5391
gpwrdn |= GPWRDN_ULPI_LATCH_EN_DURING_HIB_ENTRY ;
5392
- }
5393
- dwc2_writel (hsotg , gpwrdn , GPWRDN );
5394
- udelay (10 );
5392
+ dwc2_writel (hsotg , gpwrdn , GPWRDN );
5393
+ udelay (10 );
5395
5394
5396
- /* Suspend the Phy Clock */
5397
- pcgcctl = dwc2_readl (hsotg , PCGCTL );
5398
- pcgcctl |= PCGCTL_STOPPCLK ;
5399
- dwc2_writel (hsotg , pcgcctl , PCGCTL );
5400
- udelay (10 );
5395
+ /* Suspend the Phy Clock */
5396
+ pcgcctl = dwc2_readl (hsotg , PCGCTL );
5397
+ pcgcctl |= PCGCTL_STOPPCLK ;
5398
+ dwc2_writel (hsotg , pcgcctl , PCGCTL );
5399
+ udelay (10 );
5401
5400
5402
- gpwrdn = dwc2_readl (hsotg , GPWRDN );
5403
- gpwrdn |= GPWRDN_PMUACTV ;
5404
- dwc2_writel (hsotg , gpwrdn , GPWRDN );
5405
- udelay (10 );
5401
+ gpwrdn = dwc2_readl (hsotg , GPWRDN );
5402
+ gpwrdn |= GPWRDN_PMUACTV ;
5403
+ dwc2_writel (hsotg , gpwrdn , GPWRDN );
5404
+ udelay (10 );
5405
+ } else {
5406
+ /* UTMI+ Interface */
5407
+ dwc2_writel (hsotg , gpwrdn , GPWRDN );
5408
+ udelay (10 );
5409
+
5410
+ gpwrdn = dwc2_readl (hsotg , GPWRDN );
5411
+ gpwrdn |= GPWRDN_PMUACTV ;
5412
+ dwc2_writel (hsotg , gpwrdn , GPWRDN );
5413
+ udelay (10 );
5414
+
5415
+ pcgcctl = dwc2_readl (hsotg , PCGCTL );
5416
+ pcgcctl |= PCGCTL_STOPPCLK ;
5417
+ dwc2_writel (hsotg , pcgcctl , PCGCTL );
5418
+ udelay (10 );
5419
+ }
5406
5420
5407
5421
/* Set flag to indicate that we are in hibernation */
5408
5422
hsotg -> hibernated = 1 ;
0 commit comments