]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: Kirkwood: Fix PHY disable clk problems
authorSimon Baatz <gmbnomis@gmail.com>
Fri, 6 Jul 2012 18:42:38 +0000 (20:42 +0200)
committerAndrew Lunn <andrew@lunn.ch>
Wed, 25 Jul 2012 14:51:10 +0000 (16:51 +0200)
commit6fcca670f562f010130a93a73687e21252cc7a19
treec71c5551df6d229dd5a7b64e8a6c876a3d97f726
parent86870f2a7132b68774fcb21fa9f0ebc294a13ef0
ARM: Kirkwood: Fix PHY disable clk problems

Commit f4d4979 (ARM: Kirkwood: Replace clock gating) and the fix 5fb2ce
(ARM: Kirkwood: clk_register_gate_fn: add fn assignment) introduced a custom
variant of clock gating which allows to define a function to be called
before gating the clock off.

This is used to disable the SATA and PCIe PHYs if the respective clocks
are unused after initialization.

However, of these two drivers, the SATA driver may be compiled as a module.
The driver re-enables the clocks at module init but the PHYs stay disabled.

Since the custom clock gating disabled the PHYs when gating the clock off,
it should also re-enable them when enabling the clock gate.  This is done by
adding a second function that may be used to enable the PHYs.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
arch/arm/mach-kirkwood/common.c