Skip to contentSkip to conversation

ARM: S3C64XX: SmartQ suspend support

PATCH New Maurus Cuelenaere 1 participant 5 messages Oct 21, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARM: S3C64XX: SmartQ suspend support

These patches add suspend support to SmartQ boards, plus some S3C PM related cleanups.

Maurus Cuelenaere (4):
ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL
ARM: SAMSUNG: Fix warning 's3c_pm_show_resume_irqs' defined but not
used
ARM: S3C64XX: Add suspend support to SmartQ boards
ARM: S3C64XX: Add wakeup sources to SmartQ boards

 arch/arm/mach-s3c64xx/mach-smartq.c  |    4 ++++
 arch/arm/mach-s3c64xx/mach-smartq5.c |    1 +
 arch/arm/mach-s3c64xx/mach-smartq7.c |    1 +
 arch/arm/plat-samsung/Kconfig        |    1 +
 arch/arm/plat-samsung/pm.c           |    5 +++--
 5 files changed, 10 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/4 ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL

When selecting SAMSUNG_PM_DEBUG, it complains about a missing printascii() function if you do not select DEBUG_LL, so make the former select the latter.

---
 arch/arm/plat-samsung/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/Kconfig +1 -0
index 7c0bde7..d5816e7 100644
@@ -260,6 +260,7 @@ comment "Power management"
 config SAMSUNG_PM_DEBUG
 	bool "S3C2410 PM Suspend debug"
 	depends on PM
+	select DEBUG_LL
 	help
 	  Say Y here if you want verbose debugging from the PM Suspend and
 	  Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 2/4 ARM: SAMSUNG: Fix warning 's3c_pm_show_resume_irqs' defined but not used

In reply to Maurus Cuelenaere

s3c_pm_show_resume_irqs() is used by some s3c_pm_arch_show_resume_irqs() implementations, which get included through mach/pm-core.h. Add __maybe_unused to silence warnings when it isn't used (e.g. on S3C64XX platforms).

---
 arch/arm/plat-samsung/pm.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/plat-samsung/pm.c +3 -2
index 27cfca5..ad6dd63 100644
@@ -214,8 +214,9 @@ void s3c_pm_do_restore_core(struct sleep_save *ptr, int count)
  *
  * print any IRQs asserted at resume time (ie, we woke from)
 */
-static void s3c_pm_show_resume_irqs(int start, unsigned long which,
-				    unsigned long mask)
+static void __maybe_unused s3c_pm_show_resume_irqs(int start,
+						   unsigned long which,
+						   unsigned long mask)
 {
 	int i;
 
Signature · 1 line
1.7.2.3
#3 lore raw

PATCH 3/4 ARM: S3C64XX: Add suspend support to SmartQ boards

In reply to Maurus Cuelenaere

The only missing thing for suspend support on SmartQ boards, is a call to s3c_pm_init, so add that. This was tested on a S3C6410 SmartQ 7.

---
 arch/arm/mach-s3c64xx/mach-smartq.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/mach-smartq.c +4 -0
index 3a9639b..0f59a5c 100644
@@ -32,6 +32,7 @@
 #include <plat/iic.h>
 #include <plat/gpio-cfg.h>
 #include <plat/hwmon.h>
+#include <plat/pm.h>
 #include <plat/regs-serial.h>
 #include <plat/udc-hs.h>
 #include <plat/usb-control.h>
@@ -380,6 +381,9 @@ void __init smartq_map_io(void)
 
 void __init smartq_machine_init(void)
 {
+	/* enable suspend support */
+	s3c_pm_init();
+
 	s3c_i2c0_set_platdata(NULL);
 	s3c_hwmon_set_platdata(&smartq_hwmon_pdata);
 	s3c_sdhci1_set_platdata(&smartq_internal_hsmmc_pdata);
Signature · 1 line
1.7.2.3
#4 lore raw

PATCH 4/4 ARM: S3C64XX: Add wakeup sources to SmartQ boards

In reply to Maurus Cuelenaere

This patch adds the power on/off button on both SmartQ boards as suspend wakeup sources.

---
 arch/arm/mach-s3c64xx/mach-smartq5.c |    1 +
 arch/arm/mach-s3c64xx/mach-smartq7.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/mach-smartq5.c +1 -0
index a4d59b0..57b84d3 100644
@@ -64,6 +64,7 @@ static struct gpio_keys_button smartq5_buttons[] = {
 		.desc			= "Power",
 		.active_low		= 1,
 		.debounce_interval	= 5,
+		.wakeup			= 1,
 		.type                   = EV_KEY,
 	},
 	{
arch/arm/mach-s3c64xx/mach-smartq7.c +1 -0
index e50a7d7..5b2f9fe 100644
@@ -64,6 +64,7 @@ static struct gpio_keys_button smartq7_buttons[] = {
 		.desc			= "Power",
 		.active_low		= 1,
 		.debounce_interval	= 5,
+		.wakeup			= 1,
 		.type                   = EV_KEY,
 	},
 	{
Signature · 1 line
1.7.2.3