xtensa: rearrange CCOUNT calibration
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 20 Sep 2016 18:11:08 +0000 (11:11 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Wed, 21 Sep 2016 01:52:59 +0000 (18:52 -0700)
commit205ad548a7426fb6813760cd9917d3fc24122576
treeafee669f50dad5b75f622cecc03074d12c9b8e5f
parent58c3e3ac7a1daf56523567507a096a3e4026596d
xtensa: rearrange CCOUNT calibration

DT-enabled kernel should have a CPU node connected to a clock. This clock
is the CCOUNT clock. Use old platform_calibrate_ccount call as a fallback
when CPU node cannot be found or has no clock and in non-DT-enabled
configurations.

Drop no longer needed code that updates CPU clock-frequency property in
the DT; drop DT-related code from the platform_calibrate_ccount too.

Move of_clk_init to the top of time_init, so that clocks are initialized
before CCOUNT calibration is attempted.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/boot/dts/xtfpga.dtsi
arch/xtensa/kernel/setup.c
arch/xtensa/kernel/time.c
arch/xtensa/platforms/xtfpga/setup.c