diff options
author | Thomas Abraham <thomas.abraham@linaro.org> | 2013-03-09 09:03:29 +0100 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2013-03-25 10:17:12 +0100 |
commit | 6923ae4bd3bb85745629f120a4cccee0182a8f9d (patch) | |
tree | 75820a23e36d1732b0e4150e902874e4ef4472d9 /arch/arm/mach-exynos/common.c | |
parent | ARM: EXYNOS: Migrate clock support to common clock framework (diff) | |
download | linux-6923ae4bd3bb85745629f120a4cccee0182a8f9d.tar.xz linux-6923ae4bd3bb85745629f120a4cccee0182a8f9d.zip |
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.c | 16 |
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; |