Skip to content

Commit

Permalink
[ARM] 4735/1: Unbreak pxa25x suspend/resume
Browse files Browse the repository at this point in the history
Suspend/resume on the pxa25x was fairly obviously broken in revision
711be5c.

This patch fixes the damage by adding back the missing code.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Richard Purdie authored and Russell King committed Jan 3, 2008
1 parent b8c9a18 commit 56b1128
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion arch/arm/mach-pxa/pxa25x.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,19 @@ static void pxa25x_cpu_pm_save(unsigned long *sleep_save)
SAVE(GAFR1_L); SAVE(GAFR1_U);
SAVE(GAFR2_L); SAVE(GAFR2_U);

SAVE(ICMR);
SAVE(ICMR); ICMR = 0;
SAVE(CKEN);
SAVE(PSTR);

/* Clear GPIO transition detect bits */
GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2;
}

static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
{
/* ensure not to come back here if it wasn't intended */
PSPR = 0;

/* restore registers */
RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2);
RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2);
Expand All @@ -195,7 +201,12 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2);
RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);

PSSR = PSSR_RDH | PSSR_PH;

RESTORE(CKEN);

ICLR = 0;
ICCR = 1;
RESTORE(ICMR);
RESTORE(PSTR);
}
Expand Down

0 comments on commit 56b1128

Please sign in to comment.