diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-04-25 21:45:39 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-05 02:20:01 -0400 |
commit | 3aa3e8407ae9023c5ff59bf5c81fc2553c31eb70 (patch) | |
tree | 629912c57b790fb384f262452247467390dd82ce | |
parent | 90de41375ccf8373c0a39d04547f3e3c65d90ec0 (diff) |
ARM: davinci: use machine specific hook for late init
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r-- | arch/arm/mach-davinci/board-da830-evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm355-evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm355-leopard.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm365-evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm644x-evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm646x-evm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-mityomapl138.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-neuros-osd2.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-omapl138-hawk.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-sffsdr.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-tnetv107x-evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/clock.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-davinci/common.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-davinci/cpufreq.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/common.h | 19 | ||||
-rw-r--r-- | arch/arm/mach-davinci/pm.c | 3 |
17 files changed, 42 insertions, 6 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index dc1afe5be20c..0031864e7f11 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c | |||
@@ -681,6 +681,7 @@ MACHINE_START(DAVINCI_DA830_EVM, "DaVinci DA830/OMAP-L137/AM17x EVM") | |||
681 | .init_irq = cp_intc_init, | 681 | .init_irq = cp_intc_init, |
682 | .timer = &davinci_timer, | 682 | .timer = &davinci_timer, |
683 | .init_machine = da830_evm_init, | 683 | .init_machine = da830_evm_init, |
684 | .init_late = davinci_init_late, | ||
684 | .dma_zone_size = SZ_128M, | 685 | .dma_zone_size = SZ_128M, |
685 | .restart = da8xx_restart, | 686 | .restart = da8xx_restart, |
686 | MACHINE_END | 687 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index a70de24d1cbc..280cbeda708c 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -1411,6 +1411,7 @@ MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM") | |||
1411 | .init_irq = cp_intc_init, | 1411 | .init_irq = cp_intc_init, |
1412 | .timer = &davinci_timer, | 1412 | .timer = &davinci_timer, |
1413 | .init_machine = da850_evm_init, | 1413 | .init_machine = da850_evm_init, |
1414 | .init_late = davinci_init_late, | ||
1414 | .dma_zone_size = SZ_128M, | 1415 | .dma_zone_size = SZ_128M, |
1415 | .restart = da8xx_restart, | 1416 | .restart = da8xx_restart, |
1416 | MACHINE_END | 1417 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 82ed753fb360..1c7b1f46a8f3 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -357,6 +357,7 @@ MACHINE_START(DAVINCI_DM355_EVM, "DaVinci DM355 EVM") | |||
357 | .init_irq = davinci_irq_init, | 357 | .init_irq = davinci_irq_init, |
358 | .timer = &davinci_timer, | 358 | .timer = &davinci_timer, |
359 | .init_machine = dm355_evm_init, | 359 | .init_machine = dm355_evm_init, |
360 | .init_late = davinci_init_late, | ||
360 | .dma_zone_size = SZ_128M, | 361 | .dma_zone_size = SZ_128M, |
361 | .restart = davinci_restart, | 362 | .restart = davinci_restart, |
362 | MACHINE_END | 363 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index d74a8b3445fb..8e7703213b08 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c | |||
@@ -276,6 +276,7 @@ MACHINE_START(DM355_LEOPARD, "DaVinci DM355 leopard") | |||
276 | .init_irq = davinci_irq_init, | 276 | .init_irq = davinci_irq_init, |
277 | .timer = &davinci_timer, | 277 | .timer = &davinci_timer, |
278 | .init_machine = dm355_leopard_init, | 278 | .init_machine = dm355_leopard_init, |
279 | .init_late = davinci_init_late, | ||
279 | .dma_zone_size = SZ_128M, | 280 | .dma_zone_size = SZ_128M, |
280 | .restart = davinci_restart, | 281 | .restart = davinci_restart, |
281 | MACHINE_END | 282 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 5bce2b83bb4f..688a9c556dc9 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -618,6 +618,7 @@ MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM") | |||
618 | .init_irq = davinci_irq_init, | 618 | .init_irq = davinci_irq_init, |
619 | .timer = &davinci_timer, | 619 | .timer = &davinci_timer, |
620 | .init_machine = dm365_evm_init, | 620 | .init_machine = dm365_evm_init, |
621 | .init_late = davinci_init_late, | ||
621 | .dma_zone_size = SZ_128M, | 622 | .dma_zone_size = SZ_128M, |
622 | .restart = davinci_restart, | 623 | .restart = davinci_restart, |
623 | MACHINE_END | 624 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 3683306e0245..d34ed55912b2 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -825,6 +825,7 @@ MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM") | |||
825 | .init_irq = davinci_irq_init, | 825 | .init_irq = davinci_irq_init, |
826 | .timer = &davinci_timer, | 826 | .timer = &davinci_timer, |
827 | .init_machine = davinci_evm_init, | 827 | .init_machine = davinci_evm_init, |
828 | .init_late = davinci_init_late, | ||
828 | .dma_zone_size = SZ_128M, | 829 | .dma_zone_size = SZ_128M, |
829 | .restart = davinci_restart, | 830 | .restart = davinci_restart, |
830 | MACHINE_END | 831 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index d72ab948d630..958679a20e13 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -788,6 +788,7 @@ MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM") | |||
788 | .init_irq = davinci_irq_init, | 788 | .init_irq = davinci_irq_init, |
789 | .timer = &davinci_timer, | 789 | .timer = &davinci_timer, |
790 | .init_machine = evm_init, | 790 | .init_machine = evm_init, |
791 | .init_late = davinci_init_late, | ||
791 | .dma_zone_size = SZ_128M, | 792 | .dma_zone_size = SZ_128M, |
792 | .restart = davinci_restart, | 793 | .restart = davinci_restart, |
793 | MACHINE_END | 794 | MACHINE_END |
@@ -798,6 +799,7 @@ MACHINE_START(DAVINCI_DM6467TEVM, "DaVinci DM6467T EVM") | |||
798 | .init_irq = davinci_irq_init, | 799 | .init_irq = davinci_irq_init, |
799 | .timer = &davinci_timer, | 800 | .timer = &davinci_timer, |
800 | .init_machine = evm_init, | 801 | .init_machine = evm_init, |
802 | .init_late = davinci_init_late, | ||
801 | .dma_zone_size = SZ_128M, | 803 | .dma_zone_size = SZ_128M, |
802 | .restart = davinci_restart, | 804 | .restart = davinci_restart, |
803 | MACHINE_END | 805 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 672d820e2aa4..beecde3a1d2f 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c | |||
@@ -572,6 +572,7 @@ MACHINE_START(MITYOMAPL138, "MityDSP-L138/MityARM-1808") | |||
572 | .init_irq = cp_intc_init, | 572 | .init_irq = cp_intc_init, |
573 | .timer = &davinci_timer, | 573 | .timer = &davinci_timer, |
574 | .init_machine = mityomapl138_init, | 574 | .init_machine = mityomapl138_init, |
575 | .init_late = davinci_init_late, | ||
575 | .dma_zone_size = SZ_128M, | 576 | .dma_zone_size = SZ_128M, |
576 | .restart = da8xx_restart, | 577 | .restart = da8xx_restart, |
577 | MACHINE_END | 578 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index a772bb45570a..5de69f2fcca9 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -278,6 +278,7 @@ MACHINE_START(NEUROS_OSD2, "Neuros OSD2") | |||
278 | .init_irq = davinci_irq_init, | 278 | .init_irq = davinci_irq_init, |
279 | .timer = &davinci_timer, | 279 | .timer = &davinci_timer, |
280 | .init_machine = davinci_ntosd2_init, | 280 | .init_machine = davinci_ntosd2_init, |
281 | .init_late = davinci_init_late, | ||
281 | .dma_zone_size = SZ_128M, | 282 | .dma_zone_size = SZ_128M, |
282 | .restart = davinci_restart, | 283 | .restart = davinci_restart, |
283 | MACHINE_END | 284 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 45e815760a27..dc1208e9e664 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c | |||
@@ -343,6 +343,7 @@ MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard") | |||
343 | .init_irq = cp_intc_init, | 343 | .init_irq = cp_intc_init, |
344 | .timer = &davinci_timer, | 344 | .timer = &davinci_timer, |
345 | .init_machine = omapl138_hawk_init, | 345 | .init_machine = omapl138_hawk_init, |
346 | .init_late = davinci_init_late, | ||
346 | .dma_zone_size = SZ_128M, | 347 | .dma_zone_size = SZ_128M, |
347 | .restart = da8xx_restart, | 348 | .restart = da8xx_restart, |
348 | MACHINE_END | 349 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c index 76e675096104..9078acf94bac 100644 --- a/arch/arm/mach-davinci/board-sffsdr.c +++ b/arch/arm/mach-davinci/board-sffsdr.c | |||
@@ -157,6 +157,7 @@ MACHINE_START(SFFSDR, "Lyrtech SFFSDR") | |||
157 | .init_irq = davinci_irq_init, | 157 | .init_irq = davinci_irq_init, |
158 | .timer = &davinci_timer, | 158 | .timer = &davinci_timer, |
159 | .init_machine = davinci_sffsdr_init, | 159 | .init_machine = davinci_sffsdr_init, |
160 | .init_late = davinci_init_late, | ||
160 | .dma_zone_size = SZ_128M, | 161 | .dma_zone_size = SZ_128M, |
161 | .restart = davinci_restart, | 162 | .restart = davinci_restart, |
162 | MACHINE_END | 163 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c index 5f14e30b00d8..ac4e003ad863 100644 --- a/arch/arm/mach-davinci/board-tnetv107x-evm.c +++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c | |||
@@ -282,6 +282,7 @@ MACHINE_START(TNETV107X, "TNETV107X EVM") | |||
282 | .init_irq = cp_intc_init, | 282 | .init_irq = cp_intc_init, |
283 | .timer = &davinci_timer, | 283 | .timer = &davinci_timer, |
284 | .init_machine = tnetv107x_evm_board_init, | 284 | .init_machine = tnetv107x_evm_board_init, |
285 | .init_late = davinci_init_late, | ||
285 | .dma_zone_size = SZ_128M, | 286 | .dma_zone_size = SZ_128M, |
286 | .restart = tnetv107x_restart, | 287 | .restart = tnetv107x_restart, |
287 | MACHINE_END | 288 | MACHINE_END |
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c index 008772e3b843..34668ead53c7 100644 --- a/arch/arm/mach-davinci/clock.c +++ b/arch/arm/mach-davinci/clock.c | |||
@@ -213,7 +213,7 @@ EXPORT_SYMBOL(clk_unregister); | |||
213 | /* | 213 | /* |
214 | * Disable any unused clocks left on by the bootloader | 214 | * Disable any unused clocks left on by the bootloader |
215 | */ | 215 | */ |
216 | static int __init clk_disable_unused(void) | 216 | int __init davinci_clk_disable_unused(void) |
217 | { | 217 | { |
218 | struct clk *ck; | 218 | struct clk *ck; |
219 | 219 | ||
@@ -237,7 +237,6 @@ static int __init clk_disable_unused(void) | |||
237 | 237 | ||
238 | return 0; | 238 | return 0; |
239 | } | 239 | } |
240 | late_initcall(clk_disable_unused); | ||
241 | #endif | 240 | #endif |
242 | 241 | ||
243 | static unsigned long clk_sysclk_recalc(struct clk *clk) | 242 | static unsigned long clk_sysclk_recalc(struct clk *clk) |
diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index cb9b2e47510c..64b0f65a8639 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c | |||
@@ -117,3 +117,10 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info) | |||
117 | err: | 117 | err: |
118 | panic("davinci_common_init: SoC Initialization failed\n"); | 118 | panic("davinci_common_init: SoC Initialization failed\n"); |
119 | } | 119 | } |
120 | |||
121 | void __init davinci_init_late(void) | ||
122 | { | ||
123 | davinci_cpufreq_init(); | ||
124 | davinci_pm_init(); | ||
125 | davinci_clk_disable_unused(); | ||
126 | } | ||
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c index 031048fec9f5..4729eaab0f40 100644 --- a/arch/arm/mach-davinci/cpufreq.c +++ b/arch/arm/mach-davinci/cpufreq.c | |||
@@ -240,10 +240,9 @@ static struct platform_driver davinci_cpufreq_driver = { | |||
240 | .remove = __exit_p(davinci_cpufreq_remove), | 240 | .remove = __exit_p(davinci_cpufreq_remove), |
241 | }; | 241 | }; |
242 | 242 | ||
243 | static int __init davinci_cpufreq_init(void) | 243 | int __init davinci_cpufreq_init(void) |
244 | { | 244 | { |
245 | return platform_driver_probe(&davinci_cpufreq_driver, | 245 | return platform_driver_probe(&davinci_cpufreq_driver, |
246 | davinci_cpufreq_probe); | 246 | davinci_cpufreq_probe); |
247 | } | 247 | } |
248 | late_initcall(davinci_cpufreq_init); | ||
249 | 248 | ||
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index 5cd39a4e0c96..bdc4aa8e672a 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h | |||
@@ -84,6 +84,25 @@ extern struct davinci_soc_info davinci_soc_info; | |||
84 | extern void davinci_common_init(struct davinci_soc_info *soc_info); | 84 | extern void davinci_common_init(struct davinci_soc_info *soc_info); |
85 | extern void davinci_init_ide(void); | 85 | extern void davinci_init_ide(void); |
86 | void davinci_restart(char mode, const char *cmd); | 86 | void davinci_restart(char mode, const char *cmd); |
87 | void davinci_init_late(void); | ||
88 | |||
89 | #ifdef CONFIG_DAVINCI_RESET_CLOCKS | ||
90 | int davinci_clk_disable_unused(void); | ||
91 | #else | ||
92 | static inline int davinci_clk_disable_unused(void) { return 0; } | ||
93 | #endif | ||
94 | |||
95 | #ifdef CONFIG_CPU_FREQ | ||
96 | int davinci_cpufreq_init(void); | ||
97 | #else | ||
98 | static inline int davinci_cpufreq_init(void) { return 0; } | ||
99 | #endif | ||
100 | |||
101 | #ifdef CONFIG_SUSPEND | ||
102 | int davinci_pm_init(void); | ||
103 | #else | ||
104 | static inline int davinci_pm_init(void) { return 0; } | ||
105 | #endif | ||
87 | 106 | ||
88 | /* standard place to map on-chip SRAMs; they *may* support DMA */ | 107 | /* standard place to map on-chip SRAMs; they *may* support DMA */ |
89 | #define SRAM_VIRT 0xfffe0000 | 108 | #define SRAM_VIRT 0xfffe0000 |
diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c index 04c49f7543ef..eb8360b33aa9 100644 --- a/arch/arm/mach-davinci/pm.c +++ b/arch/arm/mach-davinci/pm.c | |||
@@ -152,8 +152,7 @@ static struct platform_driver davinci_pm_driver = { | |||
152 | .remove = __exit_p(davinci_pm_remove), | 152 | .remove = __exit_p(davinci_pm_remove), |
153 | }; | 153 | }; |
154 | 154 | ||
155 | static int __init davinci_pm_init(void) | 155 | int __init davinci_pm_init(void) |
156 | { | 156 | { |
157 | return platform_driver_probe(&davinci_pm_driver, davinci_pm_probe); | 157 | return platform_driver_probe(&davinci_pm_driver, davinci_pm_probe); |
158 | } | 158 | } |
159 | late_initcall(davinci_pm_init); | ||