aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-prima2
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-04-26 08:51:36 -0400
committerShawn Guo <shawn.guo@linaro.org>2012-05-08 08:36:22 -0400
commita4b4674e26da6b2c40f5b6485e165beb8f68d335 (patch)
tree7cd21196e22b24b3aa9c8b22e9e7fa6ad99faad4 /arch/arm/mach-prima2
parentcafa61907cb0aabbedf3c248f197130dc5332147 (diff)
ARM: prima2: use machine specific hook for late init
Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Barry Song <baohua.song@csr.com>
Diffstat (limited to 'arch/arm/mach-prima2')
-rw-r--r--arch/arm/mach-prima2/common.h6
-rw-r--r--arch/arm/mach-prima2/pm.c3
-rw-r--r--arch/arm/mach-prima2/prima2.c6
3 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
index b28a930d4f8a..60d826fc2185 100644
--- a/arch/arm/mach-prima2/common.h
+++ b/arch/arm/mach-prima2/common.h
@@ -24,4 +24,10 @@ static inline void sirfsoc_map_lluart(void) {}
24extern void __init sirfsoc_map_lluart(void); 24extern void __init sirfsoc_map_lluart(void);
25#endif 25#endif
26 26
27#ifdef CONFIG_SUSPEND
28extern int sirfsoc_pm_init(void);
29#else
30static inline int sirfsoc_pm_init(void) { return 0; }
31#endif
32
27#endif 33#endif
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c
index 26ebb57719df..fb5a7910af35 100644
--- a/arch/arm/mach-prima2/pm.c
+++ b/arch/arm/mach-prima2/pm.c
@@ -85,12 +85,11 @@ static const struct platform_suspend_ops sirfsoc_pm_ops = {
85 .valid = suspend_valid_only_mem, 85 .valid = suspend_valid_only_mem,
86}; 86};
87 87
88static int __init sirfsoc_pm_init(void) 88int __init sirfsoc_pm_init(void)
89{ 89{
90 suspend_set_ops(&sirfsoc_pm_ops); 90 suspend_set_ops(&sirfsoc_pm_ops);
91 return 0; 91 return 0;
92} 92}
93late_initcall(sirfsoc_pm_init);
94 93
95static const struct of_device_id pwrc_ids[] = { 94static const struct of_device_id pwrc_ids[] = {
96 { .compatible = "sirf,prima2-pwrc" }, 95 { .compatible = "sirf,prima2-pwrc" },
diff --git a/arch/arm/mach-prima2/prima2.c b/arch/arm/mach-prima2/prima2.c
index 02b9c05ff990..8f0429d4b79f 100644
--- a/arch/arm/mach-prima2/prima2.c
+++ b/arch/arm/mach-prima2/prima2.c
@@ -25,6 +25,11 @@ void __init sirfsoc_mach_init(void)
25 of_platform_bus_probe(NULL, sirfsoc_of_bus_ids, NULL); 25 of_platform_bus_probe(NULL, sirfsoc_of_bus_ids, NULL);
26} 26}
27 27
28void __init sirfsoc_init_late(void)
29{
30 sirfsoc_pm_init();
31}
32
28static const char *prima2cb_dt_match[] __initdata = { 33static const char *prima2cb_dt_match[] __initdata = {
29 "sirf,prima2-cb", 34 "sirf,prima2-cb",
30 NULL 35 NULL
@@ -39,6 +44,7 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
39 .timer = &sirfsoc_timer, 44 .timer = &sirfsoc_timer,
40 .dma_zone_size = SZ_256M, 45 .dma_zone_size = SZ_256M,
41 .init_machine = sirfsoc_mach_init, 46 .init_machine = sirfsoc_mach_init,
47 .init_late = sirfsoc_init_late,
42 .dt_compat = prima2cb_dt_match, 48 .dt_compat = prima2cb_dt_match,
43 .restart = sirfsoc_restart, 49 .restart = sirfsoc_restart,
44MACHINE_END 50MACHINE_END