linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pxa/hx4700: Fix basic suspend/resume
@ 2011-05-11 19:49 Paul Parsons
  2011-05-13 10:32 ` Dmitry Artamonow
  2012-02-26 10:54 ` Philipp Zabel
  0 siblings, 2 replies; 14+ messages in thread
From: Paul Parsons @ 2011-05-11 19:49 UTC (permalink / raw)
  To: linux-arm-kernel

Basic suspend/resume is fixed by ensuring that the PGSR registers are set correctly before sleep mode is entered. In particular four of the active low resets need to be driven high while in sleep mode, otherwise the unit resets itself instead of suspending. Another problem was that the PCFR_GPROD bit is apparently set by the HTC bootloader; this caused GPIO reset (i.e. the reset button) to fail immediately after returning from sleep mode.

Driver-specific bugs still remain. In particular the mmc driver does not resume properly after returning from sleep mode, thus preventing sleep mode from being entered a second time.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
---
--- clean-2.6.39-rc7/arch/arm/mach-pxa/hx4700.c	2011-05-11 00:54:10.787247169 +0100
+++ linux-2.6.39-rc7/arch/arm/mach-pxa/hx4700.c	2011-05-11 20:21:54.026109594 +0100
@@ -120,7 +120,11 @@ static unsigned long hx4700_pin_config[]
 	GPIO19_SSP2_SCLK,
 	GPIO86_SSP2_RXD,
 	GPIO87_SSP2_TXD,
-	GPIO88_GPIO,
+	MFP_CFG_OUT(GPIO88, AF0, KEEP_OUTPUT),	/* TSC2046_CS */
+
+	/* BQ24022 Regulator */
+	MFP_CFG_OUT(GPIO72, AF0, KEEP_OUTPUT),	/* BQ24022_nCHARGE_EN */
+	MFP_CFG_OUT(GPIO96, AF0, KEEP_OUTPUT),	/* BQ24022_ISET2 */
 
 	/* HX4700 specific input GPIOs */
 	GPIO12_GPIO,	/* ASIC3_IRQ */
@@ -133,6 +137,11 @@ static unsigned long hx4700_pin_config[]
 	GPIO108_GPIO,	/* GSM_READY */
 	GPIO58_GPIO,	/* TSC2046_nPENIRQ */
 	GPIO66_GPIO,	/* nSDIO_IRQ */
+
+	MFP_CFG_OUT(GPIO61, AF0, DRIVE_HIGH),	/* W3220_nRESET */
+	MFP_CFG_OUT(GPIO71, AF0, DRIVE_HIGH),	/* ASIC3_nRESET */
+	MFP_CFG_OUT(GPIO81, AF0, DRIVE_HIGH),	/* CPU_GP_nRESET */
+	MFP_CFG_OUT(GPIO116, AF0, DRIVE_HIGH),	/* CPU_HW_nRESET */
 };
 
 #define HX4700_GPIO_IN(num, _desc) \
@@ -847,6 +872,8 @@ static struct gpio_ress global_gpios[] =
 
 static void __init hx4700_init(void)
 {
+	PCFR &= ~PCFR_GPROD;	/* Else GPIO reset fails after sleep mode */
+
 	pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
 	hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios));
 

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-02-27 14:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 19:49 [PATCH] pxa/hx4700: Fix basic suspend/resume Paul Parsons
2011-05-13 10:32 ` Dmitry Artamonow
2011-05-13 19:18   ` Paul Parsons
2011-05-14 20:18     ` Dmitry Artamonow
2011-05-14 22:32       ` Paul Parsons
2011-05-15 13:14         ` Dmitry Artamonow
2011-05-15 13:27           ` Paul Parsons
2012-02-26 10:54 ` Philipp Zabel
2012-02-27  2:12   ` Haojian Zhuang
2012-02-27  2:32     ` Paul Parsons
2012-02-27  3:15       ` Haojian Zhuang
2012-02-27  9:04   ` Russell King - ARM Linux
2012-02-27  9:54     ` Haojian Zhuang
2012-02-27 14:31     ` Paul Parsons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).