summaryrefslogtreecommitdiff
path: root/drivers/clocksource/Kconfig
diff options
context:
space:
mode:
authorAlexander Kochetkov <al.kochet@gmail.com>2017-01-31 15:43:14 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2017-04-07 17:23:05 +0300
commit5e0a39d0f727b35c8b7ef56ba0724c8ceb006297 (patch)
treefacd0003d75e6f8b5f9f5230319f8c6fb895fc2f /drivers/clocksource/Kconfig
parentb72af3462dd8344285f6cc1ba726202b0d4eae20 (diff)
downloadlinux-5e0a39d0f727b35c8b7ef56ba0724c8ceb006297.tar.xz
clocksource/drivers/rockchip_timer: Implement clocksource timer
The clock supplying the arm-global-timer on the rk3188 is coming from the the cpu clock itself and thus changes its rate everytime cpufreq adjusts the cpu frequency making this timer unsuitable as a stable clocksource and sched clock. The rk3188, rk3288 and following socs share a separate timer block already handled by the rockchip-timer driver. Therefore adapt this driver to also be able to act as clocksource and sched clock on rk3188. In order to test clocksource you can run following commands and check how much time it take in real. On rk3188 it take about ~45 seconds. cpufreq-set -f 1.6GHZ date; sleep 60; date In order to use the patch you need to declare two timers in the dts file. The first timer will be initialized as clockevent provider and the second one as clocksource. The clockevent must be from alive subsystem as it used as backup for the local timers at sleep time. The patch does not break compatibility with older device tree files. The older device tree files contain only one timer. The timer will be initialized as clockevent, as expected. rk3288 (and probably anything newer) is irrelevant to this patch, as it has the arch timer interface. This patch may be useful for Cortex-A9/A5 based parts. Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/Kconfig')
-rw-r--r--drivers/clocksource/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 3356ab821624..483f3b1af4fd 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -81,6 +81,7 @@ config ROCKCHIP_TIMER
bool "Rockchip timer driver" if COMPILE_TEST
depends on ARM || ARM64
select CLKSRC_OF
+ select CLKSRC_MMIO
help
Enables the support for the rockchip timer driver.