From: Andre Przywara Date: Thu, 5 Jul 2018 12:22:04 +0100 Subject: [U-Boot] [PATCH v2] sunxi: A64: OHCI: prevent turning off shared USB clock In-Reply-To: <3e2522d3-8575-8fd1-37ba-bf47c498a665@denx.de> References: <20180704235748.8772-1-andre.przywara@arm.com> <3e2522d3-8575-8fd1-37ba-bf47c498a665@denx.de> Message-ID: <59e37d0c-0278-8a73-b90a-b2e40d206f74@arm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 05/07/18 10:25, Marek Vasut wrote: > 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 . Thank _you_ for staying on this, and insisting on the more robust solution! Cheers, Andre.