summaryrefslogtreecommitdiff
path: root/packages/kexecboot/linux-kexecboot-2.6.24/pxa-resume.patch
diff options
context:
space:
mode:
authorHenry von Tresckow <hvontres@gmail.com>2008-09-04 10:32:46 +0000
committerThomas Kunze <thommycheck@gmx.de>2008-09-04 10:32:46 +0000
commit7eb73dfd5a79abfb7efe71b897c3dbcda6e505f1 (patch)
treee2c818bf08bc5dc00623578beeed9a02f9cc8bf6 /packages/kexecboot/linux-kexecboot-2.6.24/pxa-resume.patch
parentae63a4dad7b06af132c6ba5bdb5fb98b2231525a (diff)
linux-kexecboot-2.6.24: add new version (mainly for poodle)
Diffstat (limited to 'packages/kexecboot/linux-kexecboot-2.6.24/pxa-resume.patch')
-rw-r--r--packages/kexecboot/linux-kexecboot-2.6.24/pxa-resume.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/packages/kexecboot/linux-kexecboot-2.6.24/pxa-resume.patch b/packages/kexecboot/linux-kexecboot-2.6.24/pxa-resume.patch
new file mode 100644
index 0000000000..71d466e31c
--- /dev/null
+++ b/packages/kexecboot/linux-kexecboot-2.6.24/pxa-resume.patch
@@ -0,0 +1,58 @@
+diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
+
+index a941c71..039194c 100644
+--- a/arch/arm/mach-pxa/pm.c
++++ b/arch/arm/mach-pxa/pm.c
+@@ -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;