phy: mvebu-cp110-comphy: Add clocks support
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 31 Jul 2019 12:21:08 +0000 (14:21 +0200)
committerKishon Vijay Abraham I <kishon@ti.com>
Tue, 27 Aug 2019 06:07:09 +0000 (11:37 +0530)
commit0629d57bbdbf73aed45f057741b19bdfdefe8f5b
treecad383c05c887dcebe52357ac6f3797aafdafd13
parent64ea59577f68667141609c6573a392d54fc7edbd
phy: mvebu-cp110-comphy: Add clocks support

There is no public clock tree that implies such dependencies between
the MG/MG-core/AXI clocks and the COMPHY IP but accessing the COMPHY
registers while one of the three clocks are disabled stalls the CPU.

This happens if, for instance, the COMPHY driver probe is deferred
(eg. the USB Vbus regulator driver is not yet visible). The MVPP2
driver which also needs these clocks (among others) will
prepare/enable the clocks, then be deferred, and disable/unprepare
them. Next COMPHY lane to be configured would produce an infinite
stall.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/marvell/phy-mvebu-cp110-comphy.c