]> git.kernelconcepts.de Git - karo-tx-linux.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)
commitb5409430ffaef1ed282d20cab868ee692df6dbff
treec71c5551df6d229dd5a7b64e8a6c876a3d97f726
parentf479db44d2e3d4a969897e1f5e331e5ed4ac4968
ARM: Kirkwood: Fix PHY disable clk problems

Commit 98d9986 (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