Skip to contentSkip to conversation

ARM: S3C64XX: SmartQ: add suspend support

PATCH New Maurus Cuelenaere 3 participants 8 messages Oct 5, 2010 – Oct 6, 2010

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

cover ARM: S3C64XX: SmartQ: add suspend support

These patches add suspend support to the SmartQ (and other S3C64XX) boards.

Currently the LCD needs re-initializing when waking up, otherwise it'll just display a WSOD.

This was tested on a SmartQ 7.

Maurus Cuelenaere (2):
ARM: S3C64XX: Add suspend support
ARM: S3C64XX: Add wakeup sources to SmartQ boards

 arch/arm/mach-s3c64xx/mach-smartq5.c |    1 +
 arch/arm/mach-s3c64xx/mach-smartq7.c |    1 +
 arch/arm/mach-s3c64xx/pm.c           |    3 +++
 3 files changed, 5 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/2 ARM: S3C64XX: Add suspend support

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

---
 arch/arm/mach-s3c64xx/pm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/pm.c +3 -0
index 79412f7..db292c9 100644
@@ -187,6 +187,9 @@ static int s3c64xx_pm_init(void)
 	pm_cpu_prep = s3c64xx_pm_prepare;
 	pm_cpu_sleep = s3c64xx_cpu_suspend;
 	pm_uart_udivslot = 1;
+
+	s3c_pm_init();
+
 	return 0;
 }
 
Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 1/2 ARM: S3C64XX: Add suspend support

Hi,

I agree your approach, put the common features in common place. but Samsung maintainers insist put these at each machine file at current time.

So move this to the each machines for their tastes.

Thank you,
Kyungmin Park

Quoted 31 lines · Maurus Cuelenaere

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

---
?arch/arm/mach-s3c64xx/pm.c | ? ?3 +++
?1 files changed, 3 insertions(+), 0 deletions(-)

arch/arm/mach-s3c64xx/pm.c +3 -1
index 79412f7..db292c9 100644
@@ -187,6 +187,9 @@ static int s3c64xx_pm_init(void)
 ? ? ? ?pm_cpu_prep = s3c64xx_pm_prepare;
 ? ? ? ?pm_cpu_sleep = s3c64xx_cpu_suspend;
 ? ? ? ?pm_uart_udivslot = 1;
+
+ ? ? ? s3c_pm_init();
+
 ? ? ? ?return 0;
 ?}
 
--

1.7.2.3

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

PATCH 1/2 ARM: S3C64XX: Add suspend support

Op 06-10-10 01:23, Kyungmin Park schreef:

Quoted 6 lines

Hi,

I agree your approach, put the common features in common place. but Samsung maintainers insist put these at each machine file at current time.

So move this to the each machines for their tastes.

I did it that way first, but then wondered why this wasn't done for all boards.

When looking at some S3C24XX boards, you'll see that these need changes to the bootloader to support suspend; but IIRC this isn't needed for S3C64XX so I think this can be safely enabled for all S3C64XX boards?

Signature · 1 line
Maurus Cuelenaere
#4 lore raw

PATCH 1/2 ARM: S3C64XX: Add suspend support

Quoted 6 lines · Maurus Cuelenaere

?Op 06-10-10 01:23, Kyungmin Park schreef:

Quoted 5 lines

Hi,

I agree your approach, put the common features in common place. but Samsung maintainers insist put these at each machine file at current time.

Quoted 6 lines
Quoted 1 line

So move this to the each machines for their tastes.

I did it that way first, but then wondered why this wasn't done for all boards.

When looking at some S3C24XX boards, you'll see that these need changes to the bootloader to support suspend; but IIRC this isn't needed for S3C64XX so I think this can be safely enabled for all S3C64XX boards?

There are be answered by Samsung maintainers.
I'm have same opinions since it's common feature. Previous time I already argued with them but they reject it.
you can issue it again.

and current status.

# grep s3c_pm_init -H -R arch/arm/mach-*
arch/arm/mach-s3c2410/mach-qt2410.c:    s3c_pm_init();
arch/arm/mach-s3c2410/mach-h1940.c:     s3c_pm_init();
arch/arm/mach-s3c2412/mach-jive.c:      s3c_pm_init();
arch/arm/mach-s3c2440/mach-rx3715.c:    s3c_pm_init();
arch/arm/mach-s3c2440/mach-gta02.c:     s3c_pm_init();
arch/arm/mach-s3c2440/mach-rx1950.c:    s3c_pm_init();
arch/arm/mach-s5pv210/mach-smdkv210.c:  s3c_pm_init();
arch/arm/mach-s5pv210/mach-smdkc110.c:  s3c_pm_init();

Thank you,
Kyungmin Park

Quoted 10 lines

--
Maurus Cuelenaere

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw

PATCH 1/2 ARM: S3C64XX: Add suspend support

In reply to Kyungmin Park
Quoted 4 lines · Kyungmin Park

Hi,

I agree your approach, put the common features in common place. but Samsung maintainers insist put these at each machine file at current time.

This is just an init call, the actuall implementation is common to the core. We did it this was as it was not clear if _all_ machines under the architecture could do this by default, or would need extra code in their mach implementation, or in a driver elsewhere.

I would still prefer each machine that can do pm to call s3c_pm_init() in their setup code to ensure that we don't enable pm on a machine with possibly incomplete support (especially as PM can be one of the more difficult things to debug).

#6 lore raw

PATCH 1/2 ARM: S3C64XX: Add suspend support

Op 07-10-10 00:22, Ben Dooks schreef:

Quoted 4 lines

I would still prefer each machine that can do pm to call s3c_pm_init() in their setup code to ensure that we don't enable pm on a machine with possibly incomplete support (especially as PM can be one of the more difficult things to debug).

Ok, will resend this with the call only added to mach-smartq.c

Signature · 1 line
Maurus Cuelenaere
#7 lore raw

PATCH 2/2 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