Skip to contentSkip to conversation

arm: prima2: pm: enable rtc alarm0 and alarm1 as wakeup source

PATCH New Barry Song 2 participants 4 messages Jul 30, 2013 – Aug 14, 2013

Subsystems (2)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH 1/2 arm: prima2: pm: enable rtc alarm0 and alarm1 as wakeup source

From: Xianglong Du <[email protected]>

this patch also enables RTC alarm as wakeup source after system suspends

---
 arch/arm/mach-prima2/pm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-prima2/pm.c +4 -1
index 02cc3438..3a944ed 100644
@@ -34,7 +34,10 @@ static void sirfsoc_set_wakeup_source(void)
 	pwr_trigger_en_reg = sirfsoc_rtc_iobrg_readl(sirfsoc_pwrc_base +
 		SIRFSOC_PWRC_TRIGGER_EN);
 #define X_ON_KEY_B (1 << 0)
-	sirfsoc_rtc_iobrg_writel(pwr_trigger_en_reg | X_ON_KEY_B,
+#define RTC_ALARM0_B (1 << 2)
+#define RTC_ALARM1_B (1 << 3)
+	sirfsoc_rtc_iobrg_writel(pwr_trigger_en_reg | X_ON_KEY_B |
+		RTC_ALARM0_B | RTC_ALARM1_B,
 		sirfsoc_pwrc_base + SIRFSOC_PWRC_TRIGGER_EN);
 }
 
Signature · 1 line
1.8.2.3
author
#1 lore raw

PATCH 2/2 arm: prima2: pm: drop redundant postcore_initcall

This will delete some redundant calling of sirfsoc_of_pwrc_init() and sirfsoc_memc_init() for non-CSR platforms if we use multi-platform.

Cc Srinivas Kandagatla <[email protected]>
---
 arch/arm/mach-prima2/pm.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm/mach-prima2/pm.c +8 -8
index 3a944ed..c4525a8 100644
@@ -88,12 +88,6 @@ static const struct platform_suspend_ops sirfsoc_pm_ops = {
 	.valid = suspend_valid_only_mem,
 };
 
-int __init sirfsoc_pm_init(void)
-{
-	suspend_set_ops(&sirfsoc_pm_ops);
-	return 0;
-}
-
 static const struct of_device_id pwrc_ids[] = {
 	{ .compatible = "sirf,prima2-pwrc" },
 	{}
@@ -121,7 +115,6 @@ static int __init sirfsoc_of_pwrc_init(void)
 
 	return 0;
 }
-postcore_initcall(sirfsoc_of_pwrc_init);
 
 static const struct of_device_id memc_ids[] = {
 	{ .compatible = "sirf,prima2-memc" },
@@ -152,4 +145,11 @@ static int __init sirfsoc_memc_init(void)
 {
 	return platform_driver_register(&sirfsoc_memc_driver);
 }
-postcore_initcall(sirfsoc_memc_init);
+
+int __init sirfsoc_pm_init(void)
+{
+	sirfsoc_of_pwrc_init();
+	sirfsoc_memc_init();
+	suspend_set_ops(&sirfsoc_pm_ops);
+	return 0;
+}
Signature · 1 line
1.8.2.3
#2 lore raw

PATCH 2/2 arm: prima2: pm: drop redundant postcore_initcall

Quoted 5 lines · Barry Song

This will delete some redundant calling of sirfsoc_of_pwrc_init() and sirfsoc_memc_init() for non-CSR platforms if we use multi-platform.

Cc Srinivas Kandagatla <[email protected]>

Applied, thanks.

-Olof

#3 lore raw

PATCH 1/2 arm: prima2: pm: enable rtc alarm0 and alarm1 as wakeup source

In reply to Barry Song
Quoted 6 lines · Barry Song

From: Xianglong Du <[email protected]>

this patch also enables RTC alarm as wakeup source after system suspends

Please mind your punctuation (Capital letters and periods at ends of sentences)

Also, we tend to prefer ARM: as the prefix instead of arm:.

Fixed up the above, and applied the patch.

-Olof