Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=28047eced817b3b7cd404fac4b26f29fcf04f1f7
Commit:     28047eced817b3b7cd404fac4b26f29fcf04f1f7
Parent:     804b3f9a16e446cb023417faec58b6506c834052
Author:     Ben Dooks <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 4 23:16:42 2007 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Fri Oct 5 21:21:40 2007 +0100

    [ARM] 4597/2: OSIRIS: ensure CPLD0 is preserved after suspend
    
    Ensure that CPLD is restored to the original state
    on resume, and that before going into suspend we
    select the NAND bank we booted from for restarting.
    
    Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/mach-s3c2440/mach-osiris.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-osiris.c 
b/arch/arm/mach-s3c2440/mach-osiris.c
index 0ba7e90..be5377f 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -276,7 +276,17 @@ static unsigned char pm_osiris_ctrl0;
 
 static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state)
 {
+       unsigned int tmp;
+
        pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0);
+       tmp = pm_osiris_ctrl0 & ~OSIRIS_CTRL0_NANDSEL;
+
+       /* ensure correct NAND slot is selected on resume */
+       if ((pm_osiris_ctrl0 & OSIRIS_CTRL0_BOOT_INT) == 0)
+               tmp |= 2;
+
+       __raw_writeb(tmp, OSIRIS_VA_CTRL0);
+
        return 0;
 }
 
@@ -285,6 +295,8 @@ static int osiris_pm_resume(struct sys_device *sd)
        if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8)
                __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1);
 
+       __raw_writeb(pm_osiris_ctrl0, OSIRIS_VA_CTRL0);
+
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to