aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/common.c
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2013-03-09 03:03:29 -0500
committerKukjin Kim <kgene.kim@samsung.com>2013-03-25 05:17:12 -0400
commit6923ae4bd3bb85745629f120a4cccee0182a8f9d (patch)
tree75820a23e36d1732b0e4150e902874e4ef4472d9 /arch/arm/mach-exynos/common.c
parent6e6aac7590f902d14d90bace3fd4990d57b4979d (diff)
ARM: EXYNOS: Initialize the clocks prior to timer initialization
Since the clock initialization should be completed prior to the mct timer initialization, create a new function 'exynos_init_time' that first sets up the clock and then invokes the timer initialization function. The 'init_time' callback in the board files are updated to invoke this new wrapper function. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/common.c')
-rw-r--r--arch/arm/mach-exynos/common.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index f4e8222bc3c4..50331790abc8 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -25,6 +25,8 @@
25#include <linux/irqdomain.h> 25#include <linux/irqdomain.h>
26#include <linux/irqchip.h> 26#include <linux/irqchip.h>
27#include <linux/of_address.h> 27#include <linux/of_address.h>
28#include <linux/clocksource.h>
29#include <linux/clk-provider.h>
28#include <linux/irqchip/arm-gic.h> 30#include <linux/irqchip/arm-gic.h>
29 31
30#include <asm/proc-fns.h> 32#include <asm/proc-fns.h>
@@ -395,6 +397,20 @@ static void __init exynos5440_map_io(void)
395 iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); 397 iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
396} 398}
397 399
400void __init exynos_init_time(void)
401{
402 if (of_have_populated_dt()) {
403#ifdef CONFIG_OF
404 of_clk_init(NULL);
405 clocksource_of_init();
406#endif
407 } else {
408 /* todo: remove after migrating legacy E4 platforms to dt */
409 exynos4_clk_init(NULL);
410 mct_init();
411 }
412}
413
398void __init exynos4_init_irq(void) 414void __init exynos4_init_irq(void)
399{ 415{
400 unsigned int gic_bank_offset; 416 unsigned int gic_bank_offset;