diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-05-02 05:08:06 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-08 08:36:36 -0400 |
commit | 390e0cfd320b28d6964b92d83d59168a33c28866 (patch) | |
tree | 769a24ef3085e334922bbd8043768a1bcc69d10b /arch | |
parent | 21cc1b7ede3cf456cf1d51f8a906093261f7c111 (diff) |
ARM: tegra: use machine specific hook for late init
Cc: Colin Cross <ccross@android.com>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board-dt-tegra20.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-dt-tegra30.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-harmony.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-paz00.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-seaboard.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-trimslice.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board.h | 14 | ||||
-rw-r--r-- | arch/arm/mach-tegra/clock.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/common.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/powergate.c | 4 |
10 files changed, 30 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c index 0952494f481a..0f0da6c02459 100644 --- a/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/arch/arm/mach-tegra/board-dt-tegra20.c | |||
@@ -142,6 +142,7 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)") | |||
142 | .handle_irq = gic_handle_irq, | 142 | .handle_irq = gic_handle_irq, |
143 | .timer = &tegra_timer, | 143 | .timer = &tegra_timer, |
144 | .init_machine = tegra_dt_init, | 144 | .init_machine = tegra_dt_init, |
145 | .init_late = tegra_init_late, | ||
145 | .restart = tegra_assert_system_reset, | 146 | .restart = tegra_assert_system_reset, |
146 | .dt_compat = tegra20_dt_board_compat, | 147 | .dt_compat = tegra20_dt_board_compat, |
147 | MACHINE_END | 148 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c index 5f7c03e972f3..09d21b27bf2f 100644 --- a/arch/arm/mach-tegra/board-dt-tegra30.c +++ b/arch/arm/mach-tegra/board-dt-tegra30.c | |||
@@ -80,6 +80,7 @@ DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)") | |||
80 | .handle_irq = gic_handle_irq, | 80 | .handle_irq = gic_handle_irq, |
81 | .timer = &tegra_timer, | 81 | .timer = &tegra_timer, |
82 | .init_machine = tegra30_dt_init, | 82 | .init_machine = tegra30_dt_init, |
83 | .init_late = tegra_init_late, | ||
83 | .restart = tegra_assert_system_reset, | 84 | .restart = tegra_assert_system_reset, |
84 | .dt_compat = tegra30_dt_board_compat, | 85 | .dt_compat = tegra30_dt_board_compat, |
85 | MACHINE_END | 86 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index c00aadb01e09..987115aa4d96 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c | |||
@@ -191,5 +191,6 @@ MACHINE_START(HARMONY, "harmony") | |||
191 | .handle_irq = gic_handle_irq, | 191 | .handle_irq = gic_handle_irq, |
192 | .timer = &tegra_timer, | 192 | .timer = &tegra_timer, |
193 | .init_machine = tegra_harmony_init, | 193 | .init_machine = tegra_harmony_init, |
194 | .init_late = tegra_init_late, | ||
194 | .restart = tegra_assert_system_reset, | 195 | .restart = tegra_assert_system_reset, |
195 | MACHINE_END | 196 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 330afdfa2475..2e8a4c61afb2 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c | |||
@@ -221,5 +221,6 @@ MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ") | |||
221 | .handle_irq = gic_handle_irq, | 221 | .handle_irq = gic_handle_irq, |
222 | .timer = &tegra_timer, | 222 | .timer = &tegra_timer, |
223 | .init_machine = tegra_paz00_init, | 223 | .init_machine = tegra_paz00_init, |
224 | .init_late = tegra_init_late, | ||
224 | .restart = tegra_assert_system_reset, | 225 | .restart = tegra_assert_system_reset, |
225 | MACHINE_END | 226 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c index d669847f0485..273eaaaf271a 100644 --- a/arch/arm/mach-tegra/board-seaboard.c +++ b/arch/arm/mach-tegra/board-seaboard.c | |||
@@ -289,6 +289,7 @@ MACHINE_START(SEABOARD, "seaboard") | |||
289 | .handle_irq = gic_handle_irq, | 289 | .handle_irq = gic_handle_irq, |
290 | .timer = &tegra_timer, | 290 | .timer = &tegra_timer, |
291 | .init_machine = tegra_seaboard_init, | 291 | .init_machine = tegra_seaboard_init, |
292 | .init_late = tegra_init_late, | ||
292 | .restart = tegra_assert_system_reset, | 293 | .restart = tegra_assert_system_reset, |
293 | MACHINE_END | 294 | MACHINE_END |
294 | 295 | ||
@@ -300,6 +301,7 @@ MACHINE_START(KAEN, "kaen") | |||
300 | .handle_irq = gic_handle_irq, | 301 | .handle_irq = gic_handle_irq, |
301 | .timer = &tegra_timer, | 302 | .timer = &tegra_timer, |
302 | .init_machine = tegra_kaen_init, | 303 | .init_machine = tegra_kaen_init, |
304 | .init_late = tegra_init_late, | ||
303 | .restart = tegra_assert_system_reset, | 305 | .restart = tegra_assert_system_reset, |
304 | MACHINE_END | 306 | MACHINE_END |
305 | 307 | ||
@@ -311,5 +313,6 @@ MACHINE_START(WARIO, "wario") | |||
311 | .handle_irq = gic_handle_irq, | 313 | .handle_irq = gic_handle_irq, |
312 | .timer = &tegra_timer, | 314 | .timer = &tegra_timer, |
313 | .init_machine = tegra_wario_init, | 315 | .init_machine = tegra_wario_init, |
316 | .init_late = tegra_init_late, | ||
314 | .restart = tegra_assert_system_reset, | 317 | .restart = tegra_assert_system_reset, |
315 | MACHINE_END | 318 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c index cd52820a3e37..0a2a0e5bd39e 100644 --- a/arch/arm/mach-tegra/board-trimslice.c +++ b/arch/arm/mach-tegra/board-trimslice.c | |||
@@ -180,5 +180,6 @@ MACHINE_START(TRIMSLICE, "trimslice") | |||
180 | .handle_irq = gic_handle_irq, | 180 | .handle_irq = gic_handle_irq, |
181 | .timer = &tegra_timer, | 181 | .timer = &tegra_timer, |
182 | .init_machine = tegra_trimslice_init, | 182 | .init_machine = tegra_trimslice_init, |
183 | .init_late = tegra_init_late, | ||
183 | .restart = tegra_assert_system_reset, | 184 | .restart = tegra_assert_system_reset, |
184 | MACHINE_END | 185 | MACHINE_END |
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h index 75d1543d77c0..65014968fc6c 100644 --- a/arch/arm/mach-tegra/board.h +++ b/arch/arm/mach-tegra/board.h | |||
@@ -32,5 +32,19 @@ void __init tegra_init_irq(void); | |||
32 | void __init tegra_dt_init_irq(void); | 32 | void __init tegra_dt_init_irq(void); |
33 | int __init tegra_pcie_init(bool init_port0, bool init_port1); | 33 | int __init tegra_pcie_init(bool init_port0, bool init_port1); |
34 | 34 | ||
35 | void tegra_init_late(void); | ||
36 | |||
37 | #ifdef CONFIG_DEBUG_FS | ||
38 | int tegra_clk_debugfs_init(void); | ||
39 | #else | ||
40 | static inline int tegra_clk_debugfs_init(void) { return 0; } | ||
41 | #endif | ||
42 | |||
43 | #if defined(CONFIG_ARCH_TEGRA_2x_SOC) && defined(CONFIG_DEBUG_FS) | ||
44 | int __init tegra_powergate_debugfs_init(void); | ||
45 | #else | ||
46 | static inline int tegra_powergate_debugfs_init(void) { return 0; } | ||
47 | #endif | ||
48 | |||
35 | extern struct sys_timer tegra_timer; | 49 | extern struct sys_timer tegra_timer; |
36 | #endif | 50 | #endif |
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c index 8dad8d18cb49..58f981c0819c 100644 --- a/arch/arm/mach-tegra/clock.c +++ b/arch/arm/mach-tegra/clock.c | |||
@@ -642,7 +642,7 @@ static int clk_debugfs_register(struct clk *c) | |||
642 | return 0; | 642 | return 0; |
643 | } | 643 | } |
644 | 644 | ||
645 | static int __init clk_debugfs_init(void) | 645 | int __init tegra_clk_debugfs_init(void) |
646 | { | 646 | { |
647 | struct clk *c; | 647 | struct clk *c; |
648 | struct dentry *d; | 648 | struct dentry *d; |
@@ -669,5 +669,4 @@ err_out: | |||
669 | return err; | 669 | return err; |
670 | } | 670 | } |
671 | 671 | ||
672 | late_initcall(clk_debugfs_init); | ||
673 | #endif | 672 | #endif |
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 22df10fb9972..c90ec9333f96 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -132,3 +132,9 @@ void __init tegra30_init_early(void) | |||
132 | tegra_powergate_init(); | 132 | tegra_powergate_init(); |
133 | } | 133 | } |
134 | #endif | 134 | #endif |
135 | |||
136 | void __init tegra_init_late(void) | ||
137 | { | ||
138 | tegra_clk_debugfs_init(); | ||
139 | tegra_powergate_debugfs_init(); | ||
140 | } | ||
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c index c238699ae86f..f5b12fb4ff12 100644 --- a/arch/arm/mach-tegra/powergate.c +++ b/arch/arm/mach-tegra/powergate.c | |||
@@ -234,7 +234,7 @@ static const struct file_operations powergate_fops = { | |||
234 | .release = single_release, | 234 | .release = single_release, |
235 | }; | 235 | }; |
236 | 236 | ||
237 | static int __init powergate_debugfs_init(void) | 237 | int __init tegra_powergate_debugfs_init(void) |
238 | { | 238 | { |
239 | struct dentry *d; | 239 | struct dentry *d; |
240 | int err = -ENOMEM; | 240 | int err = -ENOMEM; |
@@ -247,6 +247,4 @@ static int __init powergate_debugfs_init(void) | |||
247 | return err; | 247 | return err; |
248 | } | 248 | } |
249 | 249 | ||
250 | late_initcall(powergate_debugfs_init); | ||
251 | |||
252 | #endif | 250 | #endif |