aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/exynos_mct.c
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2013-03-09 03:10:37 -0500
committerKukjin Kim <kgene.kim@samsung.com>2013-03-25 05:17:14 -0400
commitca9048ec31ab5e50c79bf18eccb79396c1f24b22 (patch)
tree8885fe08bd68e61ae3bfaabe52c6a3149df62830 /drivers/clocksource/exynos_mct.c
parent415ac2e240f7f3e1b609f34ba7aa1c340589fdb1 (diff)
clocksource: mct: add support for mct clock setup
Add support for mct clock lookup and setup to ensure that the mct clock is has been turned on. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/clocksource/exynos_mct.c')
-rw-r--r--drivers/clocksource/exynos_mct.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index f817c5401269..203ac05e2b3d 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -479,7 +479,7 @@ static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = {
479 479
480static void __init exynos4_timer_resources(struct device_node *np) 480static void __init exynos4_timer_resources(struct device_node *np)
481{ 481{
482 struct clk *tick_clk; 482 struct clk *mct_clk, *tick_clk;
483 483
484 tick_clk = np ? of_clk_get_by_name(np, "fin_pll") : 484 tick_clk = np ? of_clk_get_by_name(np, "fin_pll") :
485 clk_get(NULL, "fin_pll"); 485 clk_get(NULL, "fin_pll");
@@ -487,6 +487,11 @@ static void __init exynos4_timer_resources(struct device_node *np)
487 panic("%s: unable to determine tick clock rate\n", __func__); 487 panic("%s: unable to determine tick clock rate\n", __func__);
488 clk_rate = clk_get_rate(tick_clk); 488 clk_rate = clk_get_rate(tick_clk);
489 489
490 mct_clk = np ? of_clk_get_by_name(np, "mct") : clk_get(NULL, "mct");
491 if (IS_ERR(mct_clk))
492 panic("%s: unable to retrieve mct clock instance\n", __func__);
493 clk_prepare_enable(mct_clk);
494
490 reg_base = np ? of_iomap(np, 0) : S5P_VA_SYSTIMER; 495 reg_base = np ? of_iomap(np, 0) : S5P_VA_SYSTIMER;
491 if (!reg_base) 496 if (!reg_base)
492 panic("%s: unable to ioremap mct address space\n", __func__); 497 panic("%s: unable to ioremap mct address space\n", __func__);