aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-prima2/pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-prima2/pm.c')
-rw-r--r--arch/arm/mach-prima2/pm.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c
index 02cc34388b05..c4525a88e5da 100644
--- a/arch/arm/mach-prima2/pm.c
+++ b/arch/arm/mach-prima2/pm.c
@@ -34,7 +34,10 @@ static void sirfsoc_set_wakeup_source(void)
34 pwr_trigger_en_reg = sirfsoc_rtc_iobrg_readl(sirfsoc_pwrc_base + 34 pwr_trigger_en_reg = sirfsoc_rtc_iobrg_readl(sirfsoc_pwrc_base +
35 SIRFSOC_PWRC_TRIGGER_EN); 35 SIRFSOC_PWRC_TRIGGER_EN);
36#define X_ON_KEY_B (1 << 0) 36#define X_ON_KEY_B (1 << 0)
37 sirfsoc_rtc_iobrg_writel(pwr_trigger_en_reg | X_ON_KEY_B, 37#define RTC_ALARM0_B (1 << 2)
38#define RTC_ALARM1_B (1 << 3)
39 sirfsoc_rtc_iobrg_writel(pwr_trigger_en_reg | X_ON_KEY_B |
40 RTC_ALARM0_B | RTC_ALARM1_B,
38 sirfsoc_pwrc_base + SIRFSOC_PWRC_TRIGGER_EN); 41 sirfsoc_pwrc_base + SIRFSOC_PWRC_TRIGGER_EN);
39} 42}
40 43
@@ -85,12 +88,6 @@ static const struct platform_suspend_ops sirfsoc_pm_ops = {
85 .valid = suspend_valid_only_mem, 88 .valid = suspend_valid_only_mem,
86}; 89};
87 90
88int __init sirfsoc_pm_init(void)
89{
90 suspend_set_ops(&sirfsoc_pm_ops);
91 return 0;
92}
93
94static const struct of_device_id pwrc_ids[] = { 91static const struct of_device_id pwrc_ids[] = {
95 { .compatible = "sirf,prima2-pwrc" }, 92 { .compatible = "sirf,prima2-pwrc" },
96 {} 93 {}
@@ -118,7 +115,6 @@ static int __init sirfsoc_of_pwrc_init(void)
118 115
119 return 0; 116 return 0;
120} 117}
121postcore_initcall(sirfsoc_of_pwrc_init);
122 118
123static const struct of_device_id memc_ids[] = { 119static const struct of_device_id memc_ids[] = {
124 { .compatible = "sirf,prima2-memc" }, 120 { .compatible = "sirf,prima2-memc" },
@@ -149,4 +145,11 @@ static int __init sirfsoc_memc_init(void)
149{ 145{
150 return platform_driver_register(&sirfsoc_memc_driver); 146 return platform_driver_register(&sirfsoc_memc_driver);
151} 147}
152postcore_initcall(sirfsoc_memc_init); 148
149int __init sirfsoc_pm_init(void)
150{
151 sirfsoc_of_pwrc_init();
152 sirfsoc_memc_init();
153 suspend_set_ops(&sirfsoc_pm_ops);
154 return 0;
155}