From: Jan Palus Date: Fri, 29 Jan 2021 01:56:30 +0100 Subject: [BUG] Hang shortly after loading FDT when booting on RK3399 In-Reply-To: <20210128222854.frg7rsziudzr44sv@pine> References: <8c03ea46-ad71-a8b2-7d99-66873ab545d4@4ray.co> <20210128222854.frg7rsziudzr44sv@pine> Message-ID: <20210129005630.hl4mlhnmtyulnl2l@pine> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 28.01.2021 23:28, Jan Palus wrote: > FWIW I figured it hangs in ohci-hcd.c at: > > static int hc_reset(ohci_t *ohci) > ... > if (ohci_readl(&ohci->regs->control) & OHCI_CTRL_IR) { This appears to be caused by following events: - usb_stop() (usb-class.c) iterates to remove every bus - starts with ehci and goes all the way to ehci_shutdown_phy() - there it calls generic_phy_exit() ending in rockchip_usb2phy_exit() - where at last it disables clock with clk_disable() (rk3399_clk_disable()) After disabling clock ohci_readl(&ohci->regs->control) starts to hang so perhaps it shouldn't be disabled until ohci is removed.