diff options
Diffstat (limited to 'arch')
33 files changed, 69 insertions, 289 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 98aee3258398..829a96d4a179 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -11,25 +11,26 @@ | |||
11 | * This file contains the ARM-specific time handling details: | 11 | * This file contains the ARM-specific time handling details: |
12 | * reading the RTC at bootup, etc... | 12 | * reading the RTC at bootup, etc... |
13 | */ | 13 | */ |
14 | #include <linux/clk-provider.h> | ||
15 | #include <linux/clocksource.h> | ||
16 | #include <linux/errno.h> | ||
14 | #include <linux/export.h> | 17 | #include <linux/export.h> |
15 | #include <linux/kernel.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/time.h> | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/irq.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/profile.h> | ||
19 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/sched_clock.h> | ||
20 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
26 | #include <linux/time.h> | ||
21 | #include <linux/timex.h> | 27 | #include <linux/timex.h> |
22 | #include <linux/errno.h> | ||
23 | #include <linux/profile.h> | ||
24 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
25 | #include <linux/clocksource.h> | ||
26 | #include <linux/irq.h> | ||
27 | #include <linux/sched_clock.h> | ||
28 | 29 | ||
29 | #include <asm/thread_info.h> | ||
30 | #include <asm/stacktrace.h> | ||
31 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
32 | #include <asm/stacktrace.h> | ||
33 | #include <asm/thread_info.h> | ||
33 | 34 | ||
34 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \ | 35 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \ |
35 | defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) | 36 | defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) |
@@ -116,8 +117,12 @@ int __init register_persistent_clock(clock_access_fn read_boot, | |||
116 | 117 | ||
117 | void __init time_init(void) | 118 | void __init time_init(void) |
118 | { | 119 | { |
119 | if (machine_desc->init_time) | 120 | if (machine_desc->init_time) { |
120 | machine_desc->init_time(); | 121 | machine_desc->init_time(); |
121 | else | 122 | } else { |
123 | #ifdef CONFIG_COMMON_CLK | ||
124 | of_clk_init(NULL); | ||
125 | #endif | ||
122 | clocksource_of_init(); | 126 | clocksource_of_init(); |
127 | } | ||
123 | } | 128 | } |
diff --git a/arch/arm/mach-bcm/board_bcm281xx.c b/arch/arm/mach-bcm/board_bcm281xx.c index 8d9f931164bb..26b2390492b8 100644 --- a/arch/arm/mach-bcm/board_bcm281xx.c +++ b/arch/arm/mach-bcm/board_bcm281xx.c | |||
@@ -68,7 +68,6 @@ static void __init board_init(void) | |||
68 | static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, }; | 68 | static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, }; |
69 | 69 | ||
70 | DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") | 70 | DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") |
71 | .init_time = clocksource_of_init, | ||
72 | .init_machine = board_init, | 71 | .init_machine = board_init, |
73 | .restart = bcm_kona_restart, | 72 | .restart = bcm_kona_restart, |
74 | .dt_compat = bcm11351_dt_compat, | 73 | .dt_compat = bcm11351_dt_compat, |
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c index 40686d7ef500..d50135be0c20 100644 --- a/arch/arm/mach-bcm2835/bcm2835.c +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/of_address.h> | 18 | #include <linux/of_address.h> |
19 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
20 | #include <linux/clk/bcm2835.h> | 20 | #include <linux/clk/bcm2835.h> |
21 | #include <linux/clocksource.h> | ||
22 | 21 | ||
23 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
@@ -134,7 +133,6 @@ DT_MACHINE_START(BCM2835, "BCM2835") | |||
134 | .init_irq = bcm2835_init_irq, | 133 | .init_irq = bcm2835_init_irq, |
135 | .handle_irq = bcm2835_handle_irq, | 134 | .handle_irq = bcm2835_handle_irq, |
136 | .init_machine = bcm2835_init, | 135 | .init_machine = bcm2835_init, |
137 | .init_time = clocksource_of_init, | ||
138 | .restart = bcm2835_restart, | 136 | .restart = bcm2835_restart, |
139 | .dt_compat = bcm2835_compat | 137 | .dt_compat = bcm2835_compat |
140 | MACHINE_END | 138 | MACHINE_END |
diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c index 49f72a848423..ddb86631f16a 100644 --- a/arch/arm/mach-dove/board-dt.c +++ b/arch/arm/mach-dove/board-dt.c | |||
@@ -10,17 +10,13 @@ | |||
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/clk-provider.h> | 12 | #include <linux/clk-provider.h> |
13 | #include <linux/clocksource.h> | ||
14 | #include <linux/irqchip.h> | ||
15 | #include <linux/of.h> | 13 | #include <linux/of.h> |
16 | #include <linux/of_platform.h> | 14 | #include <linux/of_platform.h> |
17 | #include <linux/platform_data/usb-ehci-orion.h> | ||
18 | #include <asm/hardware/cache-tauros2.h> | 15 | #include <asm/hardware/cache-tauros2.h> |
19 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
20 | #include <mach/dove.h> | 17 | #include <mach/dove.h> |
21 | #include <mach/pm.h> | 18 | #include <mach/pm.h> |
22 | #include <plat/common.h> | 19 | #include <plat/common.h> |
23 | #include <plat/irq.h> | ||
24 | #include "common.h" | 20 | #include "common.h" |
25 | 21 | ||
26 | /* | 22 | /* |
@@ -45,12 +41,6 @@ static void __init dove_legacy_clk_init(void) | |||
45 | of_clk_get_from_provider(&clkspec)); | 41 | of_clk_get_from_provider(&clkspec)); |
46 | } | 42 | } |
47 | 43 | ||
48 | static void __init dove_dt_time_init(void) | ||
49 | { | ||
50 | of_clk_init(NULL); | ||
51 | clocksource_of_init(); | ||
52 | } | ||
53 | |||
54 | static void __init dove_dt_init_early(void) | 44 | static void __init dove_dt_init_early(void) |
55 | { | 45 | { |
56 | mvebu_mbus_init("marvell,dove-mbus", | 46 | mvebu_mbus_init("marvell,dove-mbus", |
@@ -84,7 +74,6 @@ static const char * const dove_dt_board_compat[] = { | |||
84 | DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") | 74 | DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") |
85 | .map_io = dove_map_io, | 75 | .map_io = dove_map_io, |
86 | .init_early = dove_dt_init_early, | 76 | .init_early = dove_dt_init_early, |
87 | .init_time = dove_dt_time_init, | ||
88 | .init_machine = dove_dt_init, | 77 | .init_machine = dove_dt_init, |
89 | .restart = dove_restart, | 78 | .restart = dove_restart, |
90 | .dt_compat = dove_dt_board_compat, | 79 | .dt_compat = dove_dt_board_compat, |
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index ba95e5db2501..a4e7ba828810 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -26,8 +26,6 @@ | |||
26 | #include <linux/export.h> | 26 | #include <linux/export.h> |
27 | #include <linux/irqdomain.h> | 27 | #include <linux/irqdomain.h> |
28 | #include <linux/of_address.h> | 28 | #include <linux/of_address.h> |
29 | #include <linux/clocksource.h> | ||
30 | #include <linux/clk-provider.h> | ||
31 | #include <linux/irqchip/arm-gic.h> | 29 | #include <linux/irqchip/arm-gic.h> |
32 | #include <linux/irqchip/chained_irq.h> | 30 | #include <linux/irqchip/chained_irq.h> |
33 | 31 | ||
@@ -367,12 +365,6 @@ static void __init exynos5_map_io(void) | |||
367 | iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); | 365 | iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); |
368 | } | 366 | } |
369 | 367 | ||
370 | void __init exynos_init_time(void) | ||
371 | { | ||
372 | of_clk_init(NULL); | ||
373 | clocksource_of_init(); | ||
374 | } | ||
375 | |||
376 | struct bus_type exynos_subsys = { | 368 | struct bus_type exynos_subsys = { |
377 | .name = "exynos-core", | 369 | .name = "exynos-core", |
378 | .dev_name = "exynos-core", | 370 | .dev_name = "exynos-core", |
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 8646a141ae46..f0fa2050d08d 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/of.h> | 16 | #include <linux/of.h> |
17 | 17 | ||
18 | void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); | 18 | void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); |
19 | void exynos_init_time(void); | ||
20 | 19 | ||
21 | struct map_desc; | 20 | struct map_desc; |
22 | void exynos_init_io(void); | 21 | void exynos_init_io(void); |
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index 0099c6c13bba..6858d73dcf48 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/of_fdt.h> | 16 | #include <linux/of_fdt.h> |
17 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/memblock.h> | 18 | #include <linux/memblock.h> |
19 | #include <linux/clocksource.h> | ||
20 | 19 | ||
21 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
22 | #include <plat/mfc.h> | 21 | #include <plat/mfc.h> |
@@ -54,7 +53,6 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") | |||
54 | .init_early = exynos_firmware_init, | 53 | .init_early = exynos_firmware_init, |
55 | .init_machine = exynos4_dt_machine_init, | 54 | .init_machine = exynos4_dt_machine_init, |
56 | .init_late = exynos_init_late, | 55 | .init_late = exynos_init_late, |
57 | .init_time = exynos_init_time, | ||
58 | .dt_compat = exynos4_dt_compat, | 56 | .dt_compat = exynos4_dt_compat, |
59 | .restart = exynos4_restart, | 57 | .restart = exynos4_restart, |
60 | .reserve = exynos4_reserve, | 58 | .reserve = exynos4_reserve, |
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index f874b773ca13..bac21054cec8 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/of_fdt.h> | 13 | #include <linux/of_fdt.h> |
14 | #include <linux/memblock.h> | 14 | #include <linux/memblock.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/clocksource.h> | ||
17 | 16 | ||
18 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
19 | #include <mach/regs-pmu.h> | 18 | #include <mach/regs-pmu.h> |
@@ -76,7 +75,6 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") | |||
76 | .map_io = exynos_init_io, | 75 | .map_io = exynos_init_io, |
77 | .init_machine = exynos5_dt_machine_init, | 76 | .init_machine = exynos5_dt_machine_init, |
78 | .init_late = exynos_init_late, | 77 | .init_late = exynos_init_late, |
79 | .init_time = exynos_init_time, | ||
80 | .dt_compat = exynos5_dt_compat, | 78 | .dt_compat = exynos5_dt_compat, |
81 | .restart = exynos5_restart, | 79 | .restart = exynos5_restart, |
82 | .reserve = exynos5_reserve, | 80 | .reserve = exynos5_reserve, |
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 8e63ccdb0de3..e6d6eacea9d0 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
25 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
26 | #include <linux/amba/bus.h> | 26 | #include <linux/amba/bus.h> |
27 | #include <linux/clk-provider.h> | ||
28 | 27 | ||
29 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
30 | #include <asm/cputype.h> | 29 | #include <asm/cputype.h> |
@@ -83,20 +82,6 @@ static void __init highbank_init_irq(void) | |||
83 | } | 82 | } |
84 | } | 83 | } |
85 | 84 | ||
86 | static void __init highbank_timer_init(void) | ||
87 | { | ||
88 | struct device_node *np; | ||
89 | |||
90 | /* Map system registers */ | ||
91 | np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); | ||
92 | sregs_base = of_iomap(np, 0); | ||
93 | WARN_ON(!sregs_base); | ||
94 | |||
95 | of_clk_init(NULL); | ||
96 | |||
97 | clocksource_of_init(); | ||
98 | } | ||
99 | |||
100 | static void highbank_power_off(void) | 85 | static void highbank_power_off(void) |
101 | { | 86 | { |
102 | highbank_set_pwr_shutdown(); | 87 | highbank_set_pwr_shutdown(); |
@@ -155,6 +140,13 @@ static struct notifier_block highbank_platform_nb = { | |||
155 | 140 | ||
156 | static void __init highbank_init(void) | 141 | static void __init highbank_init(void) |
157 | { | 142 | { |
143 | struct device_node *np; | ||
144 | |||
145 | /* Map system registers */ | ||
146 | np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); | ||
147 | sregs_base = of_iomap(np, 0); | ||
148 | WARN_ON(!sregs_base); | ||
149 | |||
158 | pm_power_off = highbank_power_off; | 150 | pm_power_off = highbank_power_off; |
159 | highbank_pm_init(); | 151 | highbank_pm_init(); |
160 | 152 | ||
@@ -176,7 +168,6 @@ DT_MACHINE_START(HIGHBANK, "Highbank") | |||
176 | #endif | 168 | #endif |
177 | .smp = smp_ops(highbank_smp_ops), | 169 | .smp = smp_ops(highbank_smp_ops), |
178 | .init_irq = highbank_init_irq, | 170 | .init_irq = highbank_init_irq, |
179 | .init_time = highbank_timer_init, | ||
180 | .init_machine = highbank_init, | 171 | .init_machine = highbank_init, |
181 | .dt_compat = highbank_match, | 172 | .dt_compat = highbank_match, |
182 | .restart = highbank_restart, | 173 | .restart = highbank_restart, |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index 7c0dc4540aa4..ceaac9cd7b42 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/clk.h> | 11 | #include <linux/clk.h> |
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | #include <linux/clkdev.h> | 13 | #include <linux/clkdev.h> |
14 | #include <linux/clk-provider.h> | ||
14 | #include <linux/of.h> | 15 | #include <linux/of.h> |
15 | #include <linux/err.h> | 16 | #include <linux/err.h> |
16 | 17 | ||
@@ -131,8 +132,6 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
131 | { | 132 | { |
132 | int i; | 133 | int i; |
133 | 134 | ||
134 | of_clk_init(NULL); | ||
135 | |||
136 | clk[dummy] = imx_clk_fixed("dummy", 0); | 135 | clk[dummy] = imx_clk_fixed("dummy", 0); |
137 | clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil); | 136 | clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil); |
138 | clk[osc] = imx_obtain_fixed_clock("osc", rate_osc); | 137 | clk[osc] = imx_obtain_fixed_clock("osc", rate_osc); |
@@ -465,12 +464,16 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
465 | return 0; | 464 | return 0; |
466 | } | 465 | } |
467 | 466 | ||
468 | int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | 467 | static void __init mx51_clocks_init_dt(struct device_node *np) |
469 | unsigned long rate_ckih1, unsigned long rate_ckih2) | 468 | { |
469 | mx51_clocks_init(0, 0, 0, 0); | ||
470 | } | ||
471 | CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init_dt); | ||
472 | |||
473 | static void __init mx53_clocks_init(struct device_node *np) | ||
470 | { | 474 | { |
471 | int i; | 475 | int i; |
472 | unsigned long r; | 476 | unsigned long r; |
473 | struct device_node *np; | ||
474 | 477 | ||
475 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); | 478 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); |
476 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); | 479 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); |
@@ -529,12 +532,11 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
529 | pr_err("i.MX53 clk %d: register failed with %ld\n", | 532 | pr_err("i.MX53 clk %d: register failed with %ld\n", |
530 | i, PTR_ERR(clk[i])); | 533 | i, PTR_ERR(clk[i])); |
531 | 534 | ||
532 | np = of_find_compatible_node(NULL, NULL, "fsl,imx53-ccm"); | ||
533 | clk_data.clks = clk; | 535 | clk_data.clks = clk; |
534 | clk_data.clk_num = ARRAY_SIZE(clk); | 536 | clk_data.clk_num = ARRAY_SIZE(clk); |
535 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | 537 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); |
536 | 538 | ||
537 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | 539 | mx5_clocks_common_init(0, 0, 0, 0); |
538 | 540 | ||
539 | clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); | 541 | clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); |
540 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); | 542 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); |
@@ -566,16 +568,5 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
566 | 568 | ||
567 | r = clk_round_rate(clk[usboh3_per_gate], 54000000); | 569 | r = clk_round_rate(clk[usboh3_per_gate], 54000000); |
568 | clk_set_rate(clk[usboh3_per_gate], r); | 570 | clk_set_rate(clk[usboh3_per_gate], r); |
569 | |||
570 | return 0; | ||
571 | } | ||
572 | |||
573 | int __init mx51_clocks_init_dt(void) | ||
574 | { | ||
575 | return mx51_clocks_init(0, 0, 0, 0); | ||
576 | } | ||
577 | |||
578 | int __init mx53_clocks_init_dt(void) | ||
579 | { | ||
580 | return mx53_clocks_init(0, 0, 0, 0); | ||
581 | } | 571 | } |
572 | CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init); | ||
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 4517fd760bfc..28e8ca0871e8 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
@@ -63,13 +63,9 @@ extern int mx31_clocks_init(unsigned long fref); | |||
63 | extern int mx35_clocks_init(void); | 63 | extern int mx35_clocks_init(void); |
64 | extern int mx51_clocks_init(unsigned long ckil, unsigned long osc, | 64 | extern int mx51_clocks_init(unsigned long ckil, unsigned long osc, |
65 | unsigned long ckih1, unsigned long ckih2); | 65 | unsigned long ckih1, unsigned long ckih2); |
66 | extern int mx53_clocks_init(unsigned long ckil, unsigned long osc, | ||
67 | unsigned long ckih1, unsigned long ckih2); | ||
68 | extern int mx25_clocks_init_dt(void); | 66 | extern int mx25_clocks_init_dt(void); |
69 | extern int mx27_clocks_init_dt(void); | 67 | extern int mx27_clocks_init_dt(void); |
70 | extern int mx31_clocks_init_dt(void); | 68 | extern int mx31_clocks_init_dt(void); |
71 | extern int mx51_clocks_init_dt(void); | ||
72 | extern int mx53_clocks_init_dt(void); | ||
73 | extern struct platform_device *mxc_register_gpio(char *name, int id, | 69 | extern struct platform_device *mxc_register_gpio(char *name, int id, |
74 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); | 70 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); |
75 | extern void mxc_set_cpu_type(unsigned int type); | 71 | extern void mxc_set_cpu_type(unsigned int type); |
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c index 53e43e579dd7..bece8a65e6f0 100644 --- a/arch/arm/mach-imx/imx51-dt.c +++ b/arch/arm/mach-imx/imx51-dt.c | |||
@@ -34,17 +34,11 @@ static const char *imx51_dt_board_compat[] __initdata = { | |||
34 | NULL | 34 | NULL |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static void __init imx51_timer_init(void) | ||
38 | { | ||
39 | mx51_clocks_init_dt(); | ||
40 | } | ||
41 | |||
42 | DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") | 37 | DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") |
43 | .map_io = mx51_map_io, | 38 | .map_io = mx51_map_io, |
44 | .init_early = imx51_init_early, | 39 | .init_early = imx51_init_early, |
45 | .init_irq = mx51_init_irq, | 40 | .init_irq = mx51_init_irq, |
46 | .handle_irq = imx51_handle_irq, | 41 | .handle_irq = imx51_handle_irq, |
47 | .init_time = imx51_timer_init, | ||
48 | .init_machine = imx51_dt_init, | 42 | .init_machine = imx51_dt_init, |
49 | .init_late = imx51_init_late, | 43 | .init_late = imx51_init_late, |
50 | .dt_compat = imx51_dt_board_compat, | 44 | .dt_compat = imx51_dt_board_compat, |
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index 98c58944015a..c9c4d8d96931 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c | |||
@@ -36,17 +36,11 @@ static const char *imx53_dt_board_compat[] __initdata = { | |||
36 | NULL | 36 | NULL |
37 | }; | 37 | }; |
38 | 38 | ||
39 | static void __init imx53_timer_init(void) | ||
40 | { | ||
41 | mx53_clocks_init_dt(); | ||
42 | } | ||
43 | |||
44 | DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") | 39 | DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") |
45 | .map_io = mx53_map_io, | 40 | .map_io = mx53_map_io, |
46 | .init_early = imx53_init_early, | 41 | .init_early = imx53_init_early, |
47 | .init_irq = mx53_init_irq, | 42 | .init_irq = mx53_init_irq, |
48 | .handle_irq = imx53_handle_irq, | 43 | .handle_irq = imx53_handle_irq, |
49 | .init_time = imx53_timer_init, | ||
50 | .init_machine = imx53_dt_init, | 44 | .init_machine = imx53_dt_init, |
51 | .init_late = imx53_init_late, | 45 | .init_late = imx53_init_late, |
52 | .dt_compat = imx53_dt_board_compat, | 46 | .dt_compat = imx53_dt_board_compat, |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 90372a21087f..3be0fa0e9796 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -11,9 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/clk.h> | 13 | #include <linux/clk.h> |
14 | #include <linux/clk-provider.h> | ||
15 | #include <linux/clkdev.h> | 14 | #include <linux/clkdev.h> |
16 | #include <linux/clocksource.h> | ||
17 | #include <linux/cpu.h> | 15 | #include <linux/cpu.h> |
18 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
19 | #include <linux/export.h> | 17 | #include <linux/export.h> |
@@ -192,6 +190,9 @@ static void __init imx6q_1588_init(void) | |||
192 | 190 | ||
193 | static void __init imx6q_init_machine(void) | 191 | static void __init imx6q_init_machine(void) |
194 | { | 192 | { |
193 | imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", | ||
194 | imx6q_revision()); | ||
195 | |||
195 | imx6q_enet_phy_init(); | 196 | imx6q_enet_phy_init(); |
196 | 197 | ||
197 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 198 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
@@ -293,14 +294,6 @@ static void __init imx6q_init_irq(void) | |||
293 | irqchip_init(); | 294 | irqchip_init(); |
294 | } | 295 | } |
295 | 296 | ||
296 | static void __init imx6q_timer_init(void) | ||
297 | { | ||
298 | of_clk_init(NULL); | ||
299 | clocksource_of_init(); | ||
300 | imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", | ||
301 | imx6q_revision()); | ||
302 | } | ||
303 | |||
304 | static const char *imx6q_dt_compat[] __initdata = { | 297 | static const char *imx6q_dt_compat[] __initdata = { |
305 | "fsl,imx6dl", | 298 | "fsl,imx6dl", |
306 | "fsl,imx6q", | 299 | "fsl,imx6q", |
@@ -311,7 +304,6 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)") | |||
311 | .smp = smp_ops(imx_smp_ops), | 304 | .smp = smp_ops(imx_smp_ops), |
312 | .map_io = imx6q_map_io, | 305 | .map_io = imx6q_map_io, |
313 | .init_irq = imx6q_init_irq, | 306 | .init_irq = imx6q_init_irq, |
314 | .init_time = imx6q_timer_init, | ||
315 | .init_machine = imx6q_init_machine, | 307 | .init_machine = imx6q_init_machine, |
316 | .init_late = imx6q_init_late, | 308 | .init_late = imx6q_init_late, |
317 | .dt_compat = imx6q_dt_compat, | 309 | .dt_compat = imx6q_dt_compat, |
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index 0d75dc54f715..c70bd7c64974 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/clk-provider.h> | ||
11 | #include <linux/irqchip.h> | 10 | #include <linux/irqchip.h> |
12 | #include <linux/of.h> | 11 | #include <linux/of.h> |
13 | #include <linux/of_platform.h> | 12 | #include <linux/of_platform.h> |
@@ -31,11 +30,6 @@ static void __init imx6sl_init_irq(void) | |||
31 | irqchip_init(); | 30 | irqchip_init(); |
32 | } | 31 | } |
33 | 32 | ||
34 | static void __init imx6sl_timer_init(void) | ||
35 | { | ||
36 | of_clk_init(NULL); | ||
37 | } | ||
38 | |||
39 | static const char *imx6sl_dt_compat[] __initdata = { | 33 | static const char *imx6sl_dt_compat[] __initdata = { |
40 | "fsl,imx6sl", | 34 | "fsl,imx6sl", |
41 | NULL, | 35 | NULL, |
@@ -44,7 +38,6 @@ static const char *imx6sl_dt_compat[] __initdata = { | |||
44 | DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") | 38 | DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") |
45 | .map_io = debug_ll_io_init, | 39 | .map_io = debug_ll_io_init, |
46 | .init_irq = imx6sl_init_irq, | 40 | .init_irq = imx6sl_init_irq, |
47 | .init_time = imx6sl_timer_init, | ||
48 | .init_machine = imx6sl_init_machine, | 41 | .init_machine = imx6sl_init_machine, |
49 | .dt_compat = imx6sl_dt_compat, | 42 | .dt_compat = imx6sl_dt_compat, |
50 | .restart = mxc_restart, | 43 | .restart = mxc_restart, |
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c index 816991deb9b8..af0cb8a9dc48 100644 --- a/arch/arm/mach-imx/mach-vf610.c +++ b/arch/arm/mach-imx/mach-vf610.c | |||
@@ -8,9 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/of_platform.h> | 10 | #include <linux/of_platform.h> |
11 | #include <linux/clocksource.h> | ||
12 | #include <linux/irqchip.h> | 11 | #include <linux/irqchip.h> |
13 | #include <linux/clk-provider.h> | ||
14 | #include <asm/mach/arch.h> | 12 | #include <asm/mach/arch.h> |
15 | #include <asm/hardware/cache-l2x0.h> | 13 | #include <asm/hardware/cache-l2x0.h> |
16 | 14 | ||
@@ -28,12 +26,6 @@ static void __init vf610_init_irq(void) | |||
28 | irqchip_init(); | 26 | irqchip_init(); |
29 | } | 27 | } |
30 | 28 | ||
31 | static void __init vf610_init_time(void) | ||
32 | { | ||
33 | of_clk_init(NULL); | ||
34 | clocksource_of_init(); | ||
35 | } | ||
36 | |||
37 | static const char *vf610_dt_compat[] __initdata = { | 29 | static const char *vf610_dt_compat[] __initdata = { |
38 | "fsl,vf610", | 30 | "fsl,vf610", |
39 | NULL, | 31 | NULL, |
@@ -41,7 +33,6 @@ static const char *vf610_dt_compat[] __initdata = { | |||
41 | 33 | ||
42 | DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") | 34 | DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") |
43 | .init_irq = vf610_init_irq, | 35 | .init_irq = vf610_init_irq, |
44 | .init_time = vf610_init_time, | ||
45 | .init_machine = vf610_init_machine, | 36 | .init_machine = vf610_init_machine, |
46 | .dt_compat = vf610_dt_compat, | 37 | .dt_compat = vf610_dt_compat, |
47 | .restart = mxc_restart, | 38 | .restart = mxc_restart, |
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 82d3ad8e87cf..a32a3e507a9d 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
17 | #include <linux/clk-provider.h> | 17 | #include <linux/clk-provider.h> |
18 | #include <linux/clocksource.h> | ||
19 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
20 | #include <linux/irqchip.h> | 19 | #include <linux/irqchip.h> |
21 | #include <linux/kexec.h> | 20 | #include <linux/kexec.h> |
@@ -66,12 +65,6 @@ static void __init kirkwood_legacy_clk_init(void) | |||
66 | clk_prepare_enable(clk); | 65 | clk_prepare_enable(clk); |
67 | } | 66 | } |
68 | 67 | ||
69 | static void __init kirkwood_dt_time_init(void) | ||
70 | { | ||
71 | of_clk_init(NULL); | ||
72 | clocksource_of_init(); | ||
73 | } | ||
74 | |||
75 | static void __init kirkwood_dt_init_early(void) | 68 | static void __init kirkwood_dt_init_early(void) |
76 | { | 69 | { |
77 | mvebu_mbus_init("marvell,kirkwood-mbus", | 70 | mvebu_mbus_init("marvell,kirkwood-mbus", |
@@ -122,7 +115,6 @@ DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") | |||
122 | /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ | 115 | /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ |
123 | .map_io = kirkwood_map_io, | 116 | .map_io = kirkwood_map_io, |
124 | .init_early = kirkwood_dt_init_early, | 117 | .init_early = kirkwood_dt_init_early, |
125 | .init_time = kirkwood_dt_time_init, | ||
126 | .init_machine = kirkwood_dt_init, | 118 | .init_machine = kirkwood_dt_init, |
127 | .restart = kirkwood_restart, | 119 | .restart = kirkwood_restart, |
128 | .dt_compat = kirkwood_dt_board_compat, | 120 | .dt_compat = kirkwood_dt_board_compat, |
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 98f6e2adb53e..cc511a4890a3 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
@@ -13,8 +13,6 @@ | |||
13 | #include <linux/clk.h> | 13 | #include <linux/clk.h> |
14 | #include <linux/clk/mxs.h> | 14 | #include <linux/clk/mxs.h> |
15 | #include <linux/clkdev.h> | 15 | #include <linux/clkdev.h> |
16 | #include <linux/clocksource.h> | ||
17 | #include <linux/clk-provider.h> | ||
18 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
19 | #include <linux/err.h> | 17 | #include <linux/err.h> |
20 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
@@ -490,16 +488,6 @@ static void mxs_restart(enum reboot_mode mode, const char *cmd) | |||
490 | soft_restart(0); | 488 | soft_restart(0); |
491 | } | 489 | } |
492 | 490 | ||
493 | static void __init mxs_timer_init(void) | ||
494 | { | ||
495 | if (of_machine_is_compatible("fsl,imx23")) | ||
496 | mx23_clocks_init(); | ||
497 | else | ||
498 | mx28_clocks_init(); | ||
499 | of_clk_init(NULL); | ||
500 | clocksource_of_init(); | ||
501 | } | ||
502 | |||
503 | static const char *mxs_dt_compat[] __initdata = { | 491 | static const char *mxs_dt_compat[] __initdata = { |
504 | "fsl,imx28", | 492 | "fsl,imx28", |
505 | "fsl,imx23", | 493 | "fsl,imx23", |
@@ -508,7 +496,6 @@ static const char *mxs_dt_compat[] __initdata = { | |||
508 | 496 | ||
509 | DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)") | 497 | DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)") |
510 | .handle_irq = icoll_handle_irq, | 498 | .handle_irq = icoll_handle_irq, |
511 | .init_time = mxs_timer_init, | ||
512 | .init_machine = mxs_machine_init, | 499 | .init_machine = mxs_machine_init, |
513 | .init_late = mxs_pm_init, | 500 | .init_late = mxs_pm_init, |
514 | .dt_compat = mxs_dt_compat, | 501 | .dt_compat = mxs_dt_compat, |
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 13e0df9c11ce..53fbf63c8b66 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
@@ -25,8 +25,6 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
28 | #include <linux/platform_data/clk-nomadik.h> | ||
29 | #include <linux/clocksource.h> | ||
30 | #include <linux/of_irq.h> | 28 | #include <linux/of_irq.h> |
31 | #include <linux/of_gpio.h> | 29 | #include <linux/of_gpio.h> |
32 | #include <linux/of_address.h> | 30 | #include <linux/of_address.h> |
@@ -113,39 +111,6 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) | |||
113 | writel(1, srcbase + 0x18); | 111 | writel(1, srcbase + 0x18); |
114 | } | 112 | } |
115 | 113 | ||
116 | /* Initial value for SRC control register: all timers use MXTAL/8 source */ | ||
117 | #define SRC_CR_INIT_MASK 0x00007fff | ||
118 | #define SRC_CR_INIT_VAL 0x2aaa8000 | ||
119 | |||
120 | static void __init cpu8815_timer_init_of(void) | ||
121 | { | ||
122 | struct device_node *mtu; | ||
123 | void __iomem *base; | ||
124 | int irq; | ||
125 | u32 src_cr; | ||
126 | |||
127 | /* We need this to be up now */ | ||
128 | nomadik_clk_init(); | ||
129 | |||
130 | mtu = of_find_node_by_path("/mtu@101e2000"); | ||
131 | if (!mtu) | ||
132 | return; | ||
133 | base = of_iomap(mtu, 0); | ||
134 | if (WARN_ON(!base)) | ||
135 | return; | ||
136 | irq = irq_of_parse_and_map(mtu, 0); | ||
137 | |||
138 | pr_info("Remapped MTU @ %p, irq: %d\n", base, irq); | ||
139 | |||
140 | /* Configure timer sources in "system reset controller" ctrl reg */ | ||
141 | src_cr = readl(base); | ||
142 | src_cr &= SRC_CR_INIT_MASK; | ||
143 | src_cr |= SRC_CR_INIT_VAL; | ||
144 | writel(src_cr, base); | ||
145 | |||
146 | clocksource_of_init(); | ||
147 | } | ||
148 | |||
149 | static struct fsmc_nand_timings cpu8815_nand_timings = { | 114 | static struct fsmc_nand_timings cpu8815_nand_timings = { |
150 | .thiz = 0, | 115 | .thiz = 0, |
151 | .thold = 0x10, | 116 | .thold = 0x10, |
@@ -259,7 +224,6 @@ static const char * cpu8815_board_compat[] = { | |||
259 | 224 | ||
260 | DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") | 225 | DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") |
261 | .map_io = cpu8815_map_io, | 226 | .map_io = cpu8815_map_io, |
262 | .init_time = cpu8815_timer_init_of, | ||
263 | .init_machine = cpu8815_init_of, | 227 | .init_machine = cpu8815_init_of, |
264 | .restart = cpu8815_restart, | 228 | .restart = cpu8815_restart, |
265 | .dt_compat = cpu8815_board_compat, | 229 | .dt_compat = cpu8815_board_compat, |
diff --git a/arch/arm/mach-nspire/nspire.c b/arch/arm/mach-nspire/nspire.c index 99e26092a9f7..4b2ed2e8352f 100644 --- a/arch/arm/mach-nspire/nspire.c +++ b/arch/arm/mach-nspire/nspire.c | |||
@@ -14,11 +14,9 @@ | |||
14 | #include <linux/of_platform.h> | 14 | #include <linux/of_platform.h> |
15 | #include <linux/irqchip.h> | 15 | #include <linux/irqchip.h> |
16 | #include <linux/irqchip/arm-vic.h> | 16 | #include <linux/irqchip/arm-vic.h> |
17 | #include <linux/clk-provider.h> | ||
18 | #include <linux/clkdev.h> | 17 | #include <linux/clkdev.h> |
19 | #include <linux/amba/bus.h> | 18 | #include <linux/amba/bus.h> |
20 | #include <linux/amba/clcd.h> | 19 | #include <linux/amba/clcd.h> |
21 | #include <linux/clocksource.h> | ||
22 | 20 | ||
23 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
24 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
@@ -65,12 +63,6 @@ static void __init nspire_init(void) | |||
65 | nspire_auxdata, NULL); | 63 | nspire_auxdata, NULL); |
66 | } | 64 | } |
67 | 65 | ||
68 | static void __init nspire_init_time(void) | ||
69 | { | ||
70 | of_clk_init(NULL); | ||
71 | clocksource_of_init(); | ||
72 | } | ||
73 | |||
74 | static void nspire_restart(char mode, const char *cmd) | 66 | static void nspire_restart(char mode, const char *cmd) |
75 | { | 67 | { |
76 | void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K); | 68 | void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K); |
@@ -83,7 +75,6 @@ static void nspire_restart(char mode, const char *cmd) | |||
83 | DT_MACHINE_START(NSPIRE, "TI-NSPIRE") | 75 | DT_MACHINE_START(NSPIRE, "TI-NSPIRE") |
84 | .dt_compat = nspire_dt_match, | 76 | .dt_compat = nspire_dt_match, |
85 | .map_io = nspire_map_io, | 77 | .map_io = nspire_map_io, |
86 | .init_time = nspire_init_time, | ||
87 | .init_machine = nspire_init, | 78 | .init_machine = nspire_init, |
88 | .restart = nspire_restart, | 79 | .restart = nspire_restart, |
89 | MACHINE_END | 80 | MACHINE_END |
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index e110b6d4ae8c..d49aff74de98 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * Licensed under GPLv2 or later. | 6 | * Licensed under GPLv2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/clocksource.h> | ||
10 | #include <linux/init.h> | 9 | #include <linux/init.h> |
11 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
12 | #include <asm/sizes.h> | 11 | #include <asm/sizes.h> |
@@ -21,13 +20,6 @@ void __init sirfsoc_init_late(void) | |||
21 | sirfsoc_pm_init(); | 20 | sirfsoc_pm_init(); |
22 | } | 21 | } |
23 | 22 | ||
24 | static __init void sirfsoc_init_time(void) | ||
25 | { | ||
26 | /* initialize clocking early, we want to set the OS timer */ | ||
27 | sirfsoc_of_clk_init(); | ||
28 | clocksource_of_init(); | ||
29 | } | ||
30 | |||
31 | static __init void sirfsoc_map_io(void) | 23 | static __init void sirfsoc_map_io(void) |
32 | { | 24 | { |
33 | sirfsoc_map_lluart(); | 25 | sirfsoc_map_lluart(); |
@@ -43,7 +35,6 @@ static const char *atlas6_dt_match[] __initdata = { | |||
43 | DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") | 35 | DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") |
44 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | 36 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
45 | .map_io = sirfsoc_map_io, | 37 | .map_io = sirfsoc_map_io, |
46 | .init_time = sirfsoc_init_time, | ||
47 | .init_late = sirfsoc_init_late, | 38 | .init_late = sirfsoc_init_late, |
48 | .dt_compat = atlas6_dt_match, | 39 | .dt_compat = atlas6_dt_match, |
49 | .restart = sirfsoc_restart, | 40 | .restart = sirfsoc_restart, |
@@ -59,7 +50,6 @@ static const char *prima2_dt_match[] __initdata = { | |||
59 | DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") | 50 | DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") |
60 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | 51 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
61 | .map_io = sirfsoc_map_io, | 52 | .map_io = sirfsoc_map_io, |
62 | .init_time = sirfsoc_init_time, | ||
63 | .dma_zone_size = SZ_256M, | 53 | .dma_zone_size = SZ_256M, |
64 | .init_late = sirfsoc_init_late, | 54 | .init_late = sirfsoc_init_late, |
65 | .dt_compat = prima2_dt_match, | 55 | .dt_compat = prima2_dt_match, |
@@ -77,7 +67,6 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") | |||
77 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | 67 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
78 | .smp = smp_ops(sirfsoc_smp_ops), | 68 | .smp = smp_ops(sirfsoc_smp_ops), |
79 | .map_io = sirfsoc_map_io, | 69 | .map_io = sirfsoc_map_io, |
80 | .init_time = sirfsoc_init_time, | ||
81 | .init_late = sirfsoc_init_late, | 70 | .init_late = sirfsoc_init_late, |
82 | .dt_compat = marco_dt_match, | 71 | .dt_compat = marco_dt_match, |
83 | .restart = sirfsoc_restart, | 72 | .restart = sirfsoc_restart, |
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h index a6304858474a..4b768060a858 100644 --- a/arch/arm/mach-prima2/common.h +++ b/arch/arm/mach-prima2/common.h | |||
@@ -23,7 +23,6 @@ extern void sirfsoc_secondary_startup(void); | |||
23 | extern void sirfsoc_cpu_die(unsigned int cpu); | 23 | extern void sirfsoc_cpu_die(unsigned int cpu); |
24 | 24 | ||
25 | extern void __init sirfsoc_of_irq_init(void); | 25 | extern void __init sirfsoc_of_irq_init(void); |
26 | extern void __init sirfsoc_of_clk_init(void); | ||
27 | extern void sirfsoc_restart(enum reboot_mode, const char *); | 26 | extern void sirfsoc_restart(enum reboot_mode, const char *); |
28 | extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); | 27 | extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); |
29 | 28 | ||
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c index 724d2d81f976..82c0b0709712 100644 --- a/arch/arm/mach-rockchip/rockchip.c +++ b/arch/arm/mach-rockchip/rockchip.c | |||
@@ -19,18 +19,10 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
21 | #include <linux/irqchip.h> | 21 | #include <linux/irqchip.h> |
22 | #include <linux/dw_apb_timer.h> | ||
23 | #include <linux/clk-provider.h> | ||
24 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
26 | #include <asm/hardware/cache-l2x0.h> | 24 | #include <asm/hardware/cache-l2x0.h> |
27 | 25 | ||
28 | static void __init rockchip_timer_init(void) | ||
29 | { | ||
30 | of_clk_init(NULL); | ||
31 | clocksource_of_init(); | ||
32 | } | ||
33 | |||
34 | static void __init rockchip_dt_init(void) | 26 | static void __init rockchip_dt_init(void) |
35 | { | 27 | { |
36 | l2x0_of_init(0, ~0UL); | 28 | l2x0_of_init(0, ~0UL); |
@@ -47,6 +39,5 @@ static const char * const rockchip_board_dt_compat[] = { | |||
47 | 39 | ||
48 | DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)") | 40 | DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)") |
49 | .init_machine = rockchip_dt_init, | 41 | .init_machine = rockchip_dt_init, |
50 | .init_time = rockchip_timer_init, | ||
51 | .dt_compat = rockchip_board_dt_compat, | 42 | .dt_compat = rockchip_board_dt_compat, |
52 | MACHINE_END | 43 | MACHINE_END |
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index bfce9641e32f..dd0d49cdbe09 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #include <linux/clk-provider.h> | ||
18 | #include <linux/irqchip.h> | 17 | #include <linux/irqchip.h> |
19 | #include <linux/of_address.h> | 18 | #include <linux/of_address.h> |
20 | #include <linux/of_irq.h> | 19 | #include <linux/of_irq.h> |
@@ -107,7 +106,6 @@ static void __init socfpga_cyclone5_init(void) | |||
107 | { | 106 | { |
108 | l2x0_of_init(0, ~0UL); | 107 | l2x0_of_init(0, ~0UL); |
109 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 108 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
110 | of_clk_init(NULL); | ||
111 | socfpga_init_clocks(); | 109 | socfpga_init_clocks(); |
112 | } | 110 | } |
113 | 111 | ||
diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c index 8fe6f0c46480..1217fb598cfd 100644 --- a/arch/arm/mach-sti/board-dt.c +++ b/arch/arm/mach-sti/board-dt.c | |||
@@ -7,9 +7,8 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/clk-provider.h> | ||
11 | #include <linux/clocksource.h> | ||
12 | #include <linux/irq.h> | 10 | #include <linux/irq.h> |
11 | #include <linux/of_platform.h> | ||
13 | #include <asm/hardware/cache-l2x0.h> | 12 | #include <asm/hardware/cache-l2x0.h> |
14 | #include <asm/mach/arch.h> | 13 | #include <asm/mach/arch.h> |
15 | 14 | ||
@@ -28,11 +27,10 @@ void __init stih41x_l2x0_init(void) | |||
28 | l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK); | 27 | l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK); |
29 | } | 28 | } |
30 | 29 | ||
31 | static void __init stih41x_timer_init(void) | 30 | static void __init stih41x_machine_init(void) |
32 | { | 31 | { |
33 | of_clk_init(NULL); | ||
34 | clocksource_of_init(); | ||
35 | stih41x_l2x0_init(); | 32 | stih41x_l2x0_init(); |
33 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
36 | } | 34 | } |
37 | 35 | ||
38 | static const char *stih41x_dt_match[] __initdata = { | 36 | static const char *stih41x_dt_match[] __initdata = { |
@@ -42,7 +40,7 @@ static const char *stih41x_dt_match[] __initdata = { | |||
42 | }; | 40 | }; |
43 | 41 | ||
44 | DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree") | 42 | DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree") |
45 | .init_time = stih41x_timer_init, | 43 | .init_machine = stih41x_machine_init, |
46 | .smp = smp_ops(sti_smp_ops), | 44 | .smp = smp_ops(sti_smp_ops), |
47 | .dt_compat = stih41x_dt_match, | 45 | .dt_compat = stih41x_dt_match, |
48 | MACHINE_END | 46 | MACHINE_END |
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index e79fb3469341..90dda6228510 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * warranty of any kind, whether express or implied. | 10 | * warranty of any kind, whether express or implied. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/clocksource.h> | ||
14 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
@@ -20,8 +19,6 @@ | |||
20 | #include <linux/io.h> | 19 | #include <linux/io.h> |
21 | #include <linux/reboot.h> | 20 | #include <linux/reboot.h> |
22 | 21 | ||
23 | #include <linux/clk/sunxi.h> | ||
24 | |||
25 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
27 | #include <asm/system_misc.h> | 24 | #include <asm/system_misc.h> |
@@ -116,12 +113,6 @@ static void sunxi_setup_restart(void) | |||
116 | arm_pm_restart = of_id->data; | 113 | arm_pm_restart = of_id->data; |
117 | } | 114 | } |
118 | 115 | ||
119 | static void __init sunxi_timer_init(void) | ||
120 | { | ||
121 | sunxi_init_clocks(); | ||
122 | clocksource_of_init(); | ||
123 | } | ||
124 | |||
125 | static void __init sunxi_dt_init(void) | 116 | static void __init sunxi_dt_init(void) |
126 | { | 117 | { |
127 | sunxi_setup_restart(); | 118 | sunxi_setup_restart(); |
@@ -140,6 +131,5 @@ static const char * const sunxi_board_dt_compat[] = { | |||
140 | 131 | ||
141 | DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") | 132 | DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") |
142 | .init_machine = sunxi_dt_init, | 133 | .init_machine = sunxi_dt_init, |
143 | .init_time = sunxi_timer_init, | ||
144 | .dt_compat = sunxi_board_dt_compat, | 134 | .dt_compat = sunxi_board_dt_compat, |
145 | MACHINE_END | 135 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 94a119a35af8..58dc91c56ccb 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/reboot.h> | 25 | #include <linux/reboot.h> |
26 | #include <linux/irqchip.h> | 26 | #include <linux/irqchip.h> |
27 | #include <linux/clk-provider.h> | ||
28 | 27 | ||
29 | #include <asm/hardware/cache-l2x0.h> | 28 | #include <asm/hardware/cache-l2x0.h> |
30 | 29 | ||
@@ -61,8 +60,7 @@ u32 tegra_uart_config[4] = { | |||
61 | #ifdef CONFIG_OF | 60 | #ifdef CONFIG_OF |
62 | void __init tegra_dt_init_irq(void) | 61 | void __init tegra_dt_init_irq(void) |
63 | { | 62 | { |
64 | of_clk_init(NULL); | 63 | tegra_pmc_init_irq(); |
65 | tegra_pmc_init(); | ||
66 | tegra_init_irq(); | 64 | tegra_init_irq(); |
67 | irqchip_init(); | 65 | irqchip_init(); |
68 | tegra_legacy_irq_syscore_init(); | 66 | tegra_legacy_irq_syscore_init(); |
diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c index 8acb881f7cfe..7916ff91f969 100644 --- a/arch/arm/mach-tegra/pmc.c +++ b/arch/arm/mach-tegra/pmc.c | |||
@@ -285,13 +285,10 @@ static const struct of_device_id matches[] __initconst = { | |||
285 | { } | 285 | { } |
286 | }; | 286 | }; |
287 | 287 | ||
288 | static void __init tegra_pmc_parse_dt(void) | 288 | void __init tegra_pmc_init_irq(void) |
289 | { | 289 | { |
290 | struct device_node *np; | 290 | struct device_node *np; |
291 | u32 prop; | 291 | u32 val; |
292 | enum tegra_suspend_mode suspend_mode; | ||
293 | u32 core_good_time[2] = {0, 0}; | ||
294 | u32 lp0_vec[2] = {0, 0}; | ||
295 | 292 | ||
296 | np = of_find_matching_node(NULL, matches); | 293 | np = of_find_matching_node(NULL, matches); |
297 | BUG_ON(!np); | 294 | BUG_ON(!np); |
@@ -300,6 +297,26 @@ static void __init tegra_pmc_parse_dt(void) | |||
300 | 297 | ||
301 | tegra_pmc_invert_interrupt = of_property_read_bool(np, | 298 | tegra_pmc_invert_interrupt = of_property_read_bool(np, |
302 | "nvidia,invert-interrupt"); | 299 | "nvidia,invert-interrupt"); |
300 | |||
301 | val = tegra_pmc_readl(PMC_CTRL); | ||
302 | if (tegra_pmc_invert_interrupt) | ||
303 | val |= PMC_CTRL_INTR_LOW; | ||
304 | else | ||
305 | val &= ~PMC_CTRL_INTR_LOW; | ||
306 | tegra_pmc_writel(val, PMC_CTRL); | ||
307 | } | ||
308 | |||
309 | void __init tegra_pmc_init(void) | ||
310 | { | ||
311 | struct device_node *np; | ||
312 | u32 prop; | ||
313 | enum tegra_suspend_mode suspend_mode; | ||
314 | u32 core_good_time[2] = {0, 0}; | ||
315 | u32 lp0_vec[2] = {0, 0}; | ||
316 | |||
317 | np = of_find_matching_node(NULL, matches); | ||
318 | BUG_ON(!np); | ||
319 | |||
303 | tegra_pclk = of_clk_get_by_name(np, "pclk"); | 320 | tegra_pclk = of_clk_get_by_name(np, "pclk"); |
304 | WARN_ON(IS_ERR(tegra_pclk)); | 321 | WARN_ON(IS_ERR(tegra_pclk)); |
305 | 322 | ||
@@ -365,17 +382,3 @@ static void __init tegra_pmc_parse_dt(void) | |||
365 | 382 | ||
366 | pmc_pm_data.suspend_mode = suspend_mode; | 383 | pmc_pm_data.suspend_mode = suspend_mode; |
367 | } | 384 | } |
368 | |||
369 | void __init tegra_pmc_init(void) | ||
370 | { | ||
371 | u32 val; | ||
372 | |||
373 | tegra_pmc_parse_dt(); | ||
374 | |||
375 | val = tegra_pmc_readl(PMC_CTRL); | ||
376 | if (tegra_pmc_invert_interrupt) | ||
377 | val |= PMC_CTRL_INTR_LOW; | ||
378 | else | ||
379 | val &= ~PMC_CTRL_INTR_LOW; | ||
380 | tegra_pmc_writel(val, PMC_CTRL); | ||
381 | } | ||
diff --git a/arch/arm/mach-tegra/pmc.h b/arch/arm/mach-tegra/pmc.h index 549f8c7b762c..4d5f8f32225c 100644 --- a/arch/arm/mach-tegra/pmc.h +++ b/arch/arm/mach-tegra/pmc.h | |||
@@ -39,6 +39,7 @@ bool tegra_pmc_cpu_is_powered(int cpuid); | |||
39 | int tegra_pmc_cpu_power_on(int cpuid); | 39 | int tegra_pmc_cpu_power_on(int cpuid); |
40 | int tegra_pmc_cpu_remove_clamping(int cpuid); | 40 | int tegra_pmc_cpu_remove_clamping(int cpuid); |
41 | 41 | ||
42 | void tegra_pmc_init_irq(void); | ||
42 | void tegra_pmc_init(void); | 43 | void tegra_pmc_init(void); |
43 | 44 | ||
44 | #endif | 45 | #endif |
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index 5b8605547a09..2e2192807830 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/clocksource.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
@@ -44,6 +43,7 @@ | |||
44 | #include "common.h" | 43 | #include "common.h" |
45 | #include "fuse.h" | 44 | #include "fuse.h" |
46 | #include "iomap.h" | 45 | #include "iomap.h" |
46 | #include "pmc.h" | ||
47 | 47 | ||
48 | static void __init tegra_dt_init(void) | 48 | static void __init tegra_dt_init(void) |
49 | { | 49 | { |
@@ -51,6 +51,8 @@ static void __init tegra_dt_init(void) | |||
51 | struct soc_device *soc_dev; | 51 | struct soc_device *soc_dev; |
52 | struct device *parent = NULL; | 52 | struct device *parent = NULL; |
53 | 53 | ||
54 | tegra_pmc_init(); | ||
55 | |||
54 | tegra_clocks_apply_init_table(); | 56 | tegra_clocks_apply_init_table(); |
55 | 57 | ||
56 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | 58 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); |
@@ -119,7 +121,6 @@ DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)") | |||
119 | .smp = smp_ops(tegra_smp_ops), | 121 | .smp = smp_ops(tegra_smp_ops), |
120 | .init_early = tegra_init_early, | 122 | .init_early = tegra_init_early, |
121 | .init_irq = tegra_dt_init_irq, | 123 | .init_irq = tegra_dt_init_irq, |
122 | .init_time = clocksource_of_init, | ||
123 | .init_machine = tegra_dt_init, | 124 | .init_machine = tegra_dt_init, |
124 | .init_late = tegra_dt_init_late, | 125 | .init_late = tegra_dt_init_late, |
125 | .restart = tegra_assert_system_reset, | 126 | .restart = tegra_assert_system_reset, |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 95a469e23e37..4f8b8cb17ff5 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -1,12 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * Versatile Express V2M Motherboard Support | 2 | * Versatile Express V2M Motherboard Support |
3 | */ | 3 | */ |
4 | #include <linux/clocksource.h> | ||
5 | #include <linux/device.h> | 4 | #include <linux/device.h> |
6 | #include <linux/amba/bus.h> | 5 | #include <linux/amba/bus.h> |
7 | #include <linux/amba/mmci.h> | 6 | #include <linux/amba/mmci.h> |
8 | #include <linux/io.h> | 7 | #include <linux/io.h> |
9 | #include <linux/clocksource.h> | ||
10 | #include <linux/smp.h> | 8 | #include <linux/smp.h> |
11 | #include <linux/init.h> | 9 | #include <linux/init.h> |
12 | #include <linux/of_address.h> | 10 | #include <linux/of_address.h> |
@@ -22,7 +20,6 @@ | |||
22 | #include <linux/regulator/fixed.h> | 20 | #include <linux/regulator/fixed.h> |
23 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
24 | #include <linux/vexpress.h> | 22 | #include <linux/vexpress.h> |
25 | #include <linux/clk-provider.h> | ||
26 | #include <linux/clkdev.h> | 23 | #include <linux/clkdev.h> |
27 | 24 | ||
28 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
@@ -422,16 +419,8 @@ void __init v2m_dt_init_early(void) | |||
422 | pr_warning("vexpress: DT HBI (%x) is not matching " | 419 | pr_warning("vexpress: DT HBI (%x) is not matching " |
423 | "hardware (%x)!\n", dt_hbi, hbi); | 420 | "hardware (%x)!\n", dt_hbi, hbi); |
424 | } | 421 | } |
425 | } | ||
426 | |||
427 | static void __init v2m_dt_timer_init(void) | ||
428 | { | ||
429 | of_clk_init(NULL); | ||
430 | 422 | ||
431 | clocksource_of_init(); | 423 | versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000); |
432 | |||
433 | versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), | ||
434 | 24000000); | ||
435 | } | 424 | } |
436 | 425 | ||
437 | static const struct of_device_id v2m_dt_bus_match[] __initconst = { | 426 | static const struct of_device_id v2m_dt_bus_match[] __initconst = { |
@@ -458,6 +447,5 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") | |||
458 | .smp_init = smp_init_ops(vexpress_smp_init_ops), | 447 | .smp_init = smp_init_ops(vexpress_smp_init_ops), |
459 | .map_io = v2m_dt_map_io, | 448 | .map_io = v2m_dt_map_io, |
460 | .init_early = v2m_dt_init_early, | 449 | .init_early = v2m_dt_init_early, |
461 | .init_time = v2m_dt_timer_init, | ||
462 | .init_machine = v2m_dt_init, | 450 | .init_machine = v2m_dt_init, |
463 | MACHINE_END | 451 | MACHINE_END |
diff --git a/arch/arm/mach-vt8500/common.h b/arch/arm/mach-vt8500/common.h deleted file mode 100644 index 087787af62f1..000000000000 --- a/arch/arm/mach-vt8500/common.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-vt8500/dt_common.h | ||
2 | * | ||
3 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ARCH_ARM_MACH_VT8500_DT_COMMON_H | ||
17 | #define __ARCH_ARM_MACH_VT8500_DT_COMMON_H | ||
18 | |||
19 | #include <linux/of.h> | ||
20 | |||
21 | /* defined in drivers/clk/clk-vt8500.c */ | ||
22 | void __init vtwm_clk_init(void __iomem *pmc_base); | ||
23 | |||
24 | #endif | ||
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c index eefaa60d6614..4a73464cb11b 100644 --- a/arch/arm/mach-vt8500/vt8500.c +++ b/arch/arm/mach-vt8500/vt8500.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/clocksource.h> | ||
22 | #include <linux/io.h> | 21 | #include <linux/io.h> |
23 | #include <linux/pm.h> | 22 | #include <linux/pm.h> |
24 | #include <linux/reboot.h> | 23 | #include <linux/reboot.h> |
@@ -33,8 +32,6 @@ | |||
33 | #include <linux/of_irq.h> | 32 | #include <linux/of_irq.h> |
34 | #include <linux/of_platform.h> | 33 | #include <linux/of_platform.h> |
35 | 34 | ||
36 | #include "common.h" | ||
37 | |||
38 | #define LEGACY_GPIO_BASE 0xD8110000 | 35 | #define LEGACY_GPIO_BASE 0xD8110000 |
39 | #define LEGACY_PMC_BASE 0xD8130000 | 36 | #define LEGACY_PMC_BASE 0xD8130000 |
40 | 37 | ||
@@ -162,8 +159,6 @@ void __init vt8500_init(void) | |||
162 | else | 159 | else |
163 | pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__); | 160 | pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__); |
164 | 161 | ||
165 | vtwm_clk_init(pmc_base); | ||
166 | |||
167 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 162 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
168 | } | 163 | } |
169 | 164 | ||
@@ -180,7 +175,6 @@ DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)") | |||
180 | .dt_compat = vt8500_dt_compat, | 175 | .dt_compat = vt8500_dt_compat, |
181 | .map_io = vt8500_map_io, | 176 | .map_io = vt8500_map_io, |
182 | .init_machine = vt8500_init, | 177 | .init_machine = vt8500_init, |
183 | .init_time = clocksource_of_init, | ||
184 | .restart = vt8500_restart, | 178 | .restart = vt8500_restart, |
185 | MACHINE_END | 179 | MACHINE_END |
186 | 180 | ||