aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
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
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')
-rw-r--r--arch/arm/mach-exynos/common.c16
-rw-r--r--arch/arm/mach-exynos/mach-armlex4210.c2
-rw-r--r--arch/arm/mach-exynos/mach-exynos4-dt.c2
-rw-r--r--arch/arm/mach-exynos/mach-exynos5-dt.c2
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c2
-rw-r--r--arch/arm/mach-exynos/mach-origen.c2
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c4
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c4
8 files changed, 25 insertions, 9 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;
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c
index 376d6964e4aa..2c23b659ae3e 100644
--- a/arch/arm/mach-exynos/mach-armlex4210.c
+++ b/arch/arm/mach-exynos/mach-armlex4210.c
@@ -201,6 +201,6 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210")
201 .map_io = armlex4210_map_io, 201 .map_io = armlex4210_map_io,
202 .init_machine = armlex4210_machine_init, 202 .init_machine = armlex4210_machine_init,
203 .init_late = exynos_init_late, 203 .init_late = exynos_init_late,
204 .init_time = mct_init, 204 .init_time = exynos_init_time,
205 .restart = exynos4_restart, 205 .restart = exynos4_restart,
206MACHINE_END 206MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c
index e1f714647e50..47a2190cc453 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -158,7 +158,7 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
158 .map_io = exynos4_dt_map_io, 158 .map_io = exynos4_dt_map_io,
159 .init_machine = exynos4_dt_machine_init, 159 .init_machine = exynos4_dt_machine_init,
160 .init_late = exynos_init_late, 160 .init_late = exynos_init_late,
161 .init_time = clocksource_of_init, 161 .init_time = exynos_init_time,
162 .dt_compat = exynos4_dt_compat, 162 .dt_compat = exynos4_dt_compat,
163 .restart = exynos4_restart, 163 .restart = exynos4_restart,
164 .reserve = exynos4_reserve, 164 .reserve = exynos4_reserve,
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index 06b2e9596cdf..9bae9aa8d548 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -213,7 +213,7 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
213 .map_io = exynos5_dt_map_io, 213 .map_io = exynos5_dt_map_io,
214 .init_machine = exynos5_dt_machine_init, 214 .init_machine = exynos5_dt_machine_init,
215 .init_late = exynos_init_late, 215 .init_late = exynos_init_late,
216 .init_time = clocksource_of_init, 216 .init_time = exynos_init_time,
217 .dt_compat = exynos5_dt_compat, 217 .dt_compat = exynos5_dt_compat,
218 .restart = exynos5_restart, 218 .restart = exynos5_restart,
219 .reserve = exynos5_reserve, 219 .reserve = exynos5_reserve,
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 8ddbceb5ccc3..0555e6d42d5d 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -1379,7 +1379,7 @@ MACHINE_START(NURI, "NURI")
1379 .map_io = nuri_map_io, 1379 .map_io = nuri_map_io,
1380 .init_machine = nuri_machine_init, 1380 .init_machine = nuri_machine_init,
1381 .init_late = exynos_init_late, 1381 .init_late = exynos_init_late,
1382 .init_time = mct_init, 1382 .init_time = exynos_init_time,
1383 .reserve = &nuri_reserve, 1383 .reserve = &nuri_reserve,
1384 .restart = exynos4_restart, 1384 .restart = exynos4_restart,
1385MACHINE_END 1385MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 620d60c8fbb5..e42e61ae1e1c 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -814,7 +814,7 @@ MACHINE_START(ORIGEN, "ORIGEN")
814 .map_io = origen_map_io, 814 .map_io = origen_map_io,
815 .init_machine = origen_machine_init, 815 .init_machine = origen_machine_init,
816 .init_late = exynos_init_late, 816 .init_late = exynos_init_late,
817 .init_time = mct_init, 817 .init_time = exynos_init_time,
818 .reserve = &origen_reserve, 818 .reserve = &origen_reserve,
819 .restart = exynos4_restart, 819 .restart = exynos4_restart,
820MACHINE_END 820MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index 63ee1b1a8263..184faa3bd93a 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -375,7 +375,7 @@ MACHINE_START(SMDK4212, "SMDK4212")
375 .init_irq = exynos4_init_irq, 375 .init_irq = exynos4_init_irq,
376 .map_io = smdk4x12_map_io, 376 .map_io = smdk4x12_map_io,
377 .init_machine = smdk4x12_machine_init, 377 .init_machine = smdk4x12_machine_init,
378 .init_time = mct_init, 378 .init_time = exynos_init_time,
379 .restart = exynos4_restart, 379 .restart = exynos4_restart,
380 .reserve = &smdk4x12_reserve, 380 .reserve = &smdk4x12_reserve,
381MACHINE_END 381MACHINE_END
@@ -389,7 +389,7 @@ MACHINE_START(SMDK4412, "SMDK4412")
389 .map_io = smdk4x12_map_io, 389 .map_io = smdk4x12_map_io,
390 .init_machine = smdk4x12_machine_init, 390 .init_machine = smdk4x12_machine_init,
391 .init_late = exynos_init_late, 391 .init_late = exynos_init_late,
392 .init_time = mct_init, 392 .init_time = exynos_init_time,
393 .restart = exynos4_restart, 393 .restart = exynos4_restart,
394 .reserve = &smdk4x12_reserve, 394 .reserve = &smdk4x12_reserve,
395MACHINE_END 395MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index 51fa235b4dc9..4bf21988d7b3 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -422,7 +422,7 @@ MACHINE_START(SMDKV310, "SMDKV310")
422 .init_irq = exynos4_init_irq, 422 .init_irq = exynos4_init_irq,
423 .map_io = smdkv310_map_io, 423 .map_io = smdkv310_map_io,
424 .init_machine = smdkv310_machine_init, 424 .init_machine = smdkv310_machine_init,
425 .init_time = mct_init, 425 .init_time = exynos_init_time,
426 .reserve = &smdkv310_reserve, 426 .reserve = &smdkv310_reserve,
427 .restart = exynos4_restart, 427 .restart = exynos4_restart,
428MACHINE_END 428MACHINE_END
@@ -435,7 +435,7 @@ MACHINE_START(SMDKC210, "SMDKC210")
435 .map_io = smdkv310_map_io, 435 .map_io = smdkv310_map_io,
436 .init_machine = smdkv310_machine_init, 436 .init_machine = smdkv310_machine_init,
437 .init_late = exynos_init_late, 437 .init_late = exynos_init_late,
438 .init_time = mct_init, 438 .init_time = exynos_init_time,
439 .reserve = &smdkv310_reserve, 439 .reserve = &smdkv310_reserve,
440 .restart = exynos4_restart, 440 .restart = exynos4_restart,
441MACHINE_END 441MACHINE_END