summaryrefslogtreecommitdiff
path: root/arch/arm/mach-exynos/common.c
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2013-03-09 17:03:29 +0900
committerKukjin Kim <kgene.kim@samsung.com>2013-03-25 18:17:12 +0900
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 @@
#include <linux/irqdomain.h>
#include <linux/irqchip.h>
#include <linux/of_address.h>
+#include <linux/clocksource.h>
+#include <linux/clk-provider.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/proc-fns.h>
@@ -395,6 +397,20 @@ static void __init exynos5440_map_io(void)
iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
}
+void __init exynos_init_time(void)
+{
+ if (of_have_populated_dt()) {
+#ifdef CONFIG_OF
+ of_clk_init(NULL);
+ clocksource_of_init();
+#endif
+ } else {
+ /* todo: remove after migrating legacy E4 platforms to dt */
+ exynos4_clk_init(NULL);
+ mct_init();
+ }
+}
+
void __init exynos4_init_irq(void)
{
unsigned int gic_bank_offset;