]> git.neil.brown.name Git - history.git/commitdiff
[ARM PATCH] 2315/1: PXA PCMCIA Suspend/Resume bugfix
authorRichard Purdie <rpurdie@net.rmk.(none)>
Thu, 16 Dec 2004 20:16:53 +0000 (20:16 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Thu, 16 Dec 2004 20:16:53 +0000 (20:16 +0000)
Patch from Richard Purdie

The base PCMCIA code for PXA2xx doesn't work over a suspend/resume
cycle as the MECR register isn't preserved. This patch restores
the register.

Signed-off-by: Richard Purdie
Signed-off-by: Russell King
drivers/pcmcia/pxa2xx_base.c

index 2bdf9a0043979dec3d8ebb83575b32cdb5e529f8..a6936a75a87ec40b8867ce0da8ca8bfd4641cccf 100644 (file)
@@ -217,7 +217,13 @@ static int pxa2xx_drv_pcmcia_resume(struct device *dev, u32 level)
 {
        int ret = 0;
        if (level == RESUME_RESTORE_STATE)
+       {
+               struct pcmcia_low_level *ops = dev->platform_data;
+               int nr = ops ? ops->nr : 0;
+
+               MECR = nr > 1 ? MECR_CIT | MECR_NOS : (nr > 0 ? MECR_CIT : 0);
                ret = pcmcia_socket_dev_resume(dev);
+       }
        return ret;
 }