Xilinx: ARM: Port timer to COMMON_CLK
commita74754d629a1bed9d96b34cba6d1f6b14ef30fa4
authorSoren Brinkmann <soren.brinkmann@xilinx.com>
Tue, 3 Jul 2012 13:48:09 +0000 (3 06:48 -0700)
committerJohn Linn <john.linn@xilinx.com>
Wed, 22 Aug 2012 16:53:51 +0000 (22 09:53 -0700)
tree9daef1d3ee607df8b8ec28b04ddf51c63743f15a
parent2cb1e58829c118fee88b416534c5744a97a44a5f
Xilinx: ARM: Port timer to COMMON_CLK

Timer uses common clock framework, which implies the following:
Timer init is done early during boot. To make clocks available through
COMMON_CLK clock init is called from irq_init() which is called with slab up
and before time_init(). Ugly, but works.

CPU frequency scaling messes up the time base. E.g. 'sleep x' does not sleep x
secionds but x scaled up by the factor the CPU is scaled down from its initial
frequency. I cannot find a way to adjust the clocksource/timekeeping to the
changing timer frequency. For this reason the clocksource in unregistered and
re-registered on frequency changes. See the comments in timer.c for more
details.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
arch/arm/mach-zynq/common.c
arch/arm/mach-zynq/timer.c