Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77577
b: refs/heads/master
c: 512f03f
h: refs/heads/master
i:
  77575: 1b4fb7e
v: v3
  • Loading branch information
eric miao authored and Russell King committed Jan 26, 2008
1 parent 2e6a327 commit 8316a22
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd01b2fc79a567ae03d0c96ddf61eb4de729d36d
refs/heads/master: 512f03fdae58b96568bac1beee4d3d3b34d4ead4
33 changes: 18 additions & 15 deletions trunk/arch/arm/mach-pxa/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,37 @@ int pxa_pm_enter(suspend_state_t state)
iwmmxt_task_disable(NULL);
#endif

pxa_cpu_pm_fns->save(sleep_save);
/* skip registers saving for standby */
if (state != PM_SUSPEND_STANDBY) {
pxa_cpu_pm_fns->save(sleep_save);
/* before sleeping, calculate and save a checksum */
for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
sleep_save_checksum += sleep_save[i];
}

/* Clear sleep reset status */
RCSR = RCSR_SMR;

/* before sleeping, calculate and save a checksum */
for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
sleep_save_checksum += sleep_save[i];

/* *** go zzz *** */
pxa_cpu_pm_fns->enter(state);
cpu_init();

/* after sleeping, validate the checksum */
for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
checksum += sleep_save[i];
if (state != PM_SUSPEND_STANDBY) {
/* after sleeping, validate the checksum */
for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
checksum += sleep_save[i];

/* if invalid, display message and wait for a hardware reset */
if (checksum != sleep_save_checksum) {
/* if invalid, display message and wait for a hardware reset */
if (checksum != sleep_save_checksum) {
#ifdef CONFIG_ARCH_LUBBOCK
LUB_HEXLED = 0xbadbadc5;
LUB_HEXLED = 0xbadbadc5;
#endif
while (1)
pxa_cpu_pm_fns->enter(state);
while (1)
pxa_cpu_pm_fns->enter(state);
}
pxa_cpu_pm_fns->restore(sleep_save);
}

pxa_cpu_pm_fns->restore(sleep_save);

pr_debug("*** made it back from resume\n");

return 0;
Expand Down

0 comments on commit 8316a22

Please sign in to comment.