summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-07-07 21:10:17 -0700
committerOlof Johansson <olof@lixom.net>2014-07-07 21:10:17 -0700
commit069c70cb07105521a095655e707ce9c20bcc6154 (patch)
tree1ca8130ee071dd01fae618c7f04c84a24a2e0f09 /drivers
parent8b5ca6495358872d495eb7223fc6d737ee2b9b2c (diff)
parent35e75645f16c86918f26df1bfc2c24ad8ebb5a17 (diff)
downloadlinux-069c70cb07105521a095655e707ce9c20bcc6154.tar.gz
linux-069c70cb07105521a095655e707ce9c20bcc6154.tar.bz2
linux-069c70cb07105521a095655e707ce9c20bcc6154.zip
Merge tag 'samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
Merge "Samsung fixes-2 for v3.16" from Kukjin Kim: - fix the check for SMP configuration with using CONFIG_SMP not just SMP - fix the number of pwm-cells for exynos4 pwm - fix ftrace for exynos_mct - register exynos_mct for stable udely - fix secondary boot addr for secure mode for exynos SoCs * tag 'samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: EXYNOS: Update secondary boot addr for secure mode clocksource: exynos_mct: Register the timer for stable udelay clocksource: exynos_mct: Fix ftrace ARM: dts: fix pwm-cells in pwm node for exynos4 ARM: EXYNOS: Fix the check for non-smp configuration Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clocksource/exynos_mct.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index f71d55f5e6e5..ab51bf20a3ed 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -162,7 +162,7 @@ static void exynos4_mct_frc_start(void)
exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON);
}
-static cycle_t exynos4_frc_read(struct clocksource *cs)
+static cycle_t notrace _exynos4_frc_read(void)
{
unsigned int lo, hi;
u32 hi2 = __raw_readl(reg_base + EXYNOS4_MCT_G_CNT_U);
@@ -176,6 +176,11 @@ static cycle_t exynos4_frc_read(struct clocksource *cs)
return ((cycle_t)hi << 32) | lo;
}
+static cycle_t exynos4_frc_read(struct clocksource *cs)
+{
+ return _exynos4_frc_read();
+}
+
static void exynos4_frc_resume(struct clocksource *cs)
{
exynos4_mct_frc_start();
@@ -192,13 +197,24 @@ struct clocksource mct_frc = {
static u64 notrace exynos4_read_sched_clock(void)
{
- return exynos4_frc_read(&mct_frc);
+ return _exynos4_frc_read();
+}
+
+static struct delay_timer exynos4_delay_timer;
+
+static cycles_t exynos4_read_current_timer(void)
+{
+ return _exynos4_frc_read();
}
static void __init exynos4_clocksource_init(void)
{
exynos4_mct_frc_start();
+ exynos4_delay_timer.read_current_timer = &exynos4_read_current_timer;
+ exynos4_delay_timer.freq = clk_rate;
+ register_current_timer_delay(&exynos4_delay_timer);
+
if (clocksource_register_hz(&mct_frc, clk_rate))
panic("%s: can't register clocksource\n", mct_frc.name);