From c3dbb54a6d952333791d8ea4faf77dc43cc17bf6 Mon Sep 17 00:00:00 2001 From: Jianwei Zheng Date: Wed, 12 Feb 2025 16:15:09 +0800 Subject: [PATCH] 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 --- drivers/usb/dwc2/hcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 771e734f808b..97605ee7a759 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -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); /*