summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2013-04-15 15:43:45 +0530
committerAndrey Konovalov <andrey.konovalov@linaro.org>2013-07-17 22:47:19 +0400
commitd8f99a72674e8313579a298eaef7e74248fda53f (patch)
treea69fe824e6c4aff8aacae92b737b80e57b00796a /drivers
parentab8bbed66b5dceb8cf590682e776a952ed50cf55 (diff)
ARM: EXYNOS: Set arch_sys_counter as default clocksource
The Exynos 5250 includes an architected timer which is on core and very cheap to read. Enabling the architected timer can lead to a significant performance improvement for timer sensitive workloads such as TCP/IP. It turns out that both arch_sys_counter and mct-frc have a rating of 400. On bootup, arch_sys_counter is initialized first then the clocksource changes to mct-frc when that initialises later on. If the rating of mct-frc is reduced below 400, then arch_sys_counter becomes the default. Suggested-by: Steve Capper <steve.capper@linaro.org> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clocksource/exynos_mct.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 662fcc06582..376897cb322 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -27,6 +27,8 @@
#include <asm/localtimer.h>
#include <asm/mach/time.h>
+#include <plat/cpu.h>
+
#define EXYNOS4_MCTREG(x) (x)
#define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100)
#define EXYNOS4_MCT_G_CNT_U EXYNOS4_MCTREG(0x104)
@@ -194,6 +196,10 @@ static void __init exynos4_clocksource_init(void)
{
exynos4_mct_frc_start(0, 0);
+ if (soc_is_exynos5250()) {
+ mct_frc.rating = 399;
+ }
+
if (clocksource_register_hz(&mct_frc, clk_rate))
panic("%s: can't register clocksource\n", mct_frc.name);
}