ARM: RX1950: configure GPG13-15 as input before suspend
authorVasily Khoruzhick <anarsoul@gmail.com>
Tue, 11 May 2010 06:55:11 +0000 (09:55 +0300)
committerBen Dooks <ben-linux@fluff.org>
Wed, 12 May 2010 00:20:28 +0000 (09:20 +0900)
According to datasheet GPG13-15 must be configured as input in NAND
boot mode, otherwise device will not be able to wake up

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s3c2410/pm.c

index 6a61486ca75551904837a5422f1daf076346570a..725636fc4dc3a892a9a89d72d03c8804eb9ba283 100644 (file)
@@ -79,6 +79,17 @@ static void s3c2410_pm_prepare(void)
        if ( machine_is_aml_m5900() )
                s3c2410_gpio_setpin(S3C2410_GPF(2), 1);
 
+       if (machine_is_rx1950()) {
+               /* According to S3C2442 user's manual, page 7-17,
+                * when the system is operating in NAND boot mode,
+                * the hardware pin configuration - EINT[23:21] –
+                * must be set as input for starting up after
+                * wakeup from sleep mode
+                */
+               s3c_gpio_cfgpin(S3C2410_GPG(13), S3C2410_GPIO_INPUT);
+               s3c_gpio_cfgpin(S3C2410_GPG(14), S3C2410_GPIO_INPUT);
+               s3c_gpio_cfgpin(S3C2410_GPG(15), S3C2410_GPIO_INPUT);
+       }
 }
 
 static int s3c2410_pm_resume(struct sys_device *dev)