usb: dwc2: skip core init if ARCH_ROCKCHIP is defined

There is no need to do dwc2_core_init() for Rockchip SOCs if the
logic is not powered off after system suspend. If the logic is
powered off after system suspend, we will reinitialize the core
in dwc2_resume() function.

Change-Id: Ibe6d0e81e5a39feca528c838c187cfe8c31269f5
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
This commit is contained in:
Jianwei Zheng
2025-02-12 16:15:09 +08:00
committed by Tao Huang
parent 8f68e85c3d
commit c3dbb54a6d

View File

@@ -4493,9 +4493,11 @@ static int _dwc2_hcd_resume(struct usb_hcd *hcd)
* Initialize the Core for Host mode, as after system resume
* the global interrupts are disabled.
*/
#ifndef CONFIG_ARCH_ROCKCHIP
dwc2_core_init(hsotg, false);
dwc2_enable_global_interrupts(hsotg);
dwc2_hcd_reinit(hsotg);
#endif
spin_lock_irqsave(&hsotg->lock, flags);
/*