From: Marek Vasut Date: Thu, 5 Jul 2018 11:25:41 +0200 Subject: [U-Boot] [PATCH v2] sunxi: A64: OHCI: prevent turning off shared USB clock In-Reply-To: <20180704235748.8772-1-andre.przywara@arm.com> References: <20180704235748.8772-1-andre.przywara@arm.com> Message-ID: <3e2522d3-8575-8fd1-37ba-bf47c498a665@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/05/2018 01:57 AM, Andre Przywara wrote: > On the A64 the clock for the first USB controller is actually the parent > of the clock for the second controller, so turning them off in that order > makes the system hang. > Fix this by only turning off *both* clocks when the *last* OHCI controller > is brought down. This covers the case when only one controller is used. > > Signed-off-by: Andre Przywara > --- > Hi, > > as requested by Marek, a second version to address the problem of only > one controller instantiated. I tested all cases: > - only [EO]HCI1 enabled (current U-Boot master DT) > - both controllers enabled (mainline Linux DT) > - only [EO]HCI0 enabled (DT hack) > In all cases the system booted without hanging, plus I confirmed that > the USB clocks were disabled in all cases (early in the kernel). > > Cheers, > Andre. > > P.S. I found the MMC0, EMAC and USB-OTG AHB gates and resets still running, > but this is an unrelated issue and no regression. Just in case somebody > feels bored ... Applied, thanks for all the effort you put into this . -- Best regards, Marek Vasut