diff options
| author | Shawn Guo <shawn.guo@linaro.org> | 2012-04-26 08:40:32 -0400 |
|---|---|---|
| committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-08 08:36:21 -0400 |
| commit | cafa61907cb0aabbedf3c248f197130dc5332147 (patch) | |
| tree | 308fc3efc6ce7b27d4934a119db378e0d51cea3d | |
| parent | bbd707acee279a61177a604822db92e8164d00db (diff) | |
ARM: pnx4008: use machine specific hook for late init
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
| -rw-r--r-- | arch/arm/mach-pnx4008/core.c | 12 | ||||
| -rw-r--r-- | arch/arm/mach-pnx4008/pm.c | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/arch/arm/mach-pnx4008/core.c b/arch/arm/mach-pnx4008/core.c index be4c92858509..a00d2f1254ed 100644 --- a/arch/arm/mach-pnx4008/core.c +++ b/arch/arm/mach-pnx4008/core.c | |||
| @@ -265,6 +265,17 @@ static void pnx4008_restart(char mode, const char *cmd) | |||
| 265 | soft_restart(0); | 265 | soft_restart(0); |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | #ifdef CONFIG_PM | ||
| 269 | extern int pnx4008_pm_init(void); | ||
| 270 | #else | ||
| 271 | static inline int pnx4008_pm_init(void) { return 0; } | ||
| 272 | #endif | ||
| 273 | |||
| 274 | void __init pnx4008_init_late(void) | ||
| 275 | { | ||
| 276 | pnx4008_pm_init(); | ||
| 277 | } | ||
| 278 | |||
| 268 | extern struct sys_timer pnx4008_timer; | 279 | extern struct sys_timer pnx4008_timer; |
| 269 | 280 | ||
| 270 | MACHINE_START(PNX4008, "Philips PNX4008") | 281 | MACHINE_START(PNX4008, "Philips PNX4008") |
| @@ -273,6 +284,7 @@ MACHINE_START(PNX4008, "Philips PNX4008") | |||
| 273 | .map_io = pnx4008_map_io, | 284 | .map_io = pnx4008_map_io, |
| 274 | .init_irq = pnx4008_init_irq, | 285 | .init_irq = pnx4008_init_irq, |
| 275 | .init_machine = pnx4008_init, | 286 | .init_machine = pnx4008_init, |
| 287 | .init_late = pnx4008_init_late, | ||
| 276 | .timer = &pnx4008_timer, | 288 | .timer = &pnx4008_timer, |
| 277 | .restart = pnx4008_restart, | 289 | .restart = pnx4008_restart, |
| 278 | MACHINE_END | 290 | MACHINE_END |
diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c index f3e60a049f98..26f8d06b142a 100644 --- a/arch/arm/mach-pnx4008/pm.c +++ b/arch/arm/mach-pnx4008/pm.c | |||
| @@ -124,7 +124,7 @@ static const struct platform_suspend_ops pnx4008_pm_ops = { | |||
| 124 | .valid = pnx4008_pm_valid, | 124 | .valid = pnx4008_pm_valid, |
| 125 | }; | 125 | }; |
| 126 | 126 | ||
| 127 | static int __init pnx4008_pm_init(void) | 127 | int __init pnx4008_pm_init(void) |
| 128 | { | 128 | { |
| 129 | u32 sram_size_to_allocate; | 129 | u32 sram_size_to_allocate; |
| 130 | 130 | ||
| @@ -151,5 +151,3 @@ static int __init pnx4008_pm_init(void) | |||
| 151 | suspend_set_ops(&pnx4008_pm_ops); | 151 | suspend_set_ops(&pnx4008_pm_ops); |
| 152 | return 0; | 152 | return 0; |
| 153 | } | 153 | } |
| 154 | |||
| 155 | late_initcall(pnx4008_pm_init); | ||
