You need to sign in or sign up before continuing.
提交 28047ece 编写于 作者: B Ben Dooks 提交者: Russell King

[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: NBen Dooks <ben-linux@fluff.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 804b3f9a
...@@ -276,7 +276,17 @@ static unsigned char pm_osiris_ctrl0; ...@@ -276,7 +276,17 @@ static unsigned char pm_osiris_ctrl0;
static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state) static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state)
{ {
unsigned int tmp;
pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0); 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; return 0;
} }
...@@ -285,6 +295,8 @@ static int osiris_pm_resume(struct sys_device *sd) ...@@ -285,6 +295,8 @@ static int osiris_pm_resume(struct sys_device *sd)
if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8) if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8)
__raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1); __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1);
__raw_writeb(pm_osiris_ctrl0, OSIRIS_VA_CTRL0);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册