ARM: 7211/1: smp_twd: get the rate from a clock
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 13 Dec 2011 11:47:31 +0000 (12:47 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 23 Dec 2011 22:54:50 +0000 (22:54 +0000)
commit5def51b0f827931bb559e6195060d774894fc9f9
tree5be35f870a5e18f0a27eb9b35a61ea2b8b171574
parent54d15b1d7ac550ecd8ab6b04309c2def614f8c80
ARM: 7211/1: smp_twd: get the rate from a clock

This break-out from Colin Cross' cpufreq-aware TWD patch will
optionally retrieve the clock rate of the TWD from an external
clock. A variant of this patch has been proposed by Rob Herring
as well.

The basic idea is to avoid recalibrating the rate of the clock
at boot if the platform already know what rate the clock to the
TWD block has.

ChangeLog v1->v2: added clk_[prepare|unprepare] calls.

[Broke out of larger SMP TWD patch]

Signed-off-by: Colin Cross <ccross@android.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/smp_twd.c