sunxi: A64: OHCI: prevent turning off shared USB clock
authorAndre Przywara <andre.przywara@arm.com>
Wed, 4 Jul 2018 23:57:48 +0000 (00:57 +0100)
committerMarek Vasut <marex@denx.de>
Thu, 5 Jul 2018 09:25:50 +0000 (11:25 +0200)
commit0bc846a769d43810af9e4622473b85ffaead3dea
tree8d4d62f1eb006b83edc58370778b0d142d762d3d
parentff5d5cc2331033c8a6987bb644827b52484160d9
sunxi: A64: OHCI: prevent turning off shared USB clock

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 <andre.przywara@arm.com>
drivers/usb/host/ohci-sunxi.c