summaryrefslogtreecommitdiff
path: root/packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-09-22 07:41:55 +0000
committerKoen Kooi <koen@openembedded.org>2007-09-22 07:41:55 +0000
commit613ad22e06e94f5fbc8a703b94ee645de0f28d77 (patch)
tree28f76ee1671dd30d245d3e94bfa5ad980e6d8c34 /packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch
parent4fb125dd1d1105e04dd764c5acd3b360e0ce8fd4 (diff)
linux-ezx: sync a1200 and e6 changes with openezx svn, add more RP patches
Diffstat (limited to 'packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch')
-rwxr-xr-xpackages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch52
1 files changed, 18 insertions, 34 deletions
diff --git a/packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch b/packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch
index ff3413f062..05748e681c 100755
--- a/packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch
+++ b/packages/linux/linux-ezx-2.6.21/patches/ezx-pm.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.21/arch/arm/mach-pxa/pxa27x.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/pxa27x.c 2007-06-28 19:44:28.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/pxa27x.c 2007-06-28 19:44:58.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/pxa27x.c 2007-09-21 23:57:40.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/pxa27x.c 2007-09-21 23:57:49.000000000 -0300
@@ -22,6 +22,10 @@
#include <asm/arch/pxa-regs.h>
#include <asm/arch/ohci.h>
@@ -29,8 +29,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/pxa27x.c
}
Index: linux-2.6.21/arch/arm/mach-pxa/pm.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/pm.c 2007-06-28 19:44:28.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/pm.c 2007-06-28 19:44:58.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/pm.c 2007-09-21 23:57:40.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/pm.c 2007-09-21 23:57:49.000000000 -0300
@@ -24,6 +24,10 @@
#include <asm/arch/lubbock.h>
#include <asm/mach/time.h>
@@ -58,8 +58,8 @@ Index: linux-2.6.21/arch/arm/mach-pxa/pm.c
RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2);
Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
===================================================================
---- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-06-28 19:44:52.000000000 -0300
-+++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-06-28 19:44:58.000000000 -0300
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx.c 2007-09-21 23:57:48.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx.c 2007-09-22 00:07:34.000000000 -0300
@@ -19,6 +19,7 @@
#include <asm/arch/pxa-regs.h>
#include <asm/arch/ohci.h>
@@ -68,49 +68,33 @@ Index: linux-2.6.21/arch/arm/mach-pxa/ezx.c
#include "generic.h"
-@@ -122,8 +123,69 @@
+@@ -122,8 +123,53 @@
&ezxbp_device,
};
+/* PM */
+extern int bp_handshake_passed(void);
+
-+#define POWER_OFF_TIMEOUT (2*60*HZ)
-+
+static void ezx_reboot_poweroff(char mode)
+{
-+#ifdef CONFIG_EZX_BP
-+ unsigned long start = jiffies;
-+
-+ printk("Waiting for BP to turn off. This can take some time...\n");
+ *(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = NO_FLAG;
+ cpu_proc_fin();
+
-+ do {
-+ /*
-+ * Turn off gracefully. Wait BP turn off first, and then
-+ * properly turn off.
-+ */
-+ if (pxa_gpio_get_value(GPIO_BB_WDI) == 0) {
-+ *(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = WDI_FLAG;
++#ifdef CONFIG_EZX_BP
++ if (pxa_gpio_get_value(GPIO_BB_WDI) == 0) {
++ *(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = WDI_FLAG;
+
-+ /* reset BP */
-+ pxa_gpio_set_value(GPIO_BB_RESET, 0);
-+ mdelay(1);
-+ pxa_gpio_set_value(GPIO_BB_RESET, 1);
++ /* reset BP */
++ pxa_gpio_set_value(GPIO_BB_RESET, 0);
++ mdelay(1);
++ pxa_gpio_set_value(GPIO_BB_RESET, 1);
+
-+ if (mode == 'z')
-+ arch_reset('h');
-+ break;
-+ }
-+ /* Just turn it off! */
-+ if (!bp_handshake_passed() || !pxa_gpio_get_value(GPIO_BB_WDI2)
-+ || (jiffies - start) >= POWER_OFF_TIMEOUT) {
-+ break;
++ if (mode == 'z') {
++ arch_reset('h');
++ while(1);
+ }
-+ } while(1);
++ }
+#endif
-+
+ if (mode == 'z')
+ /* Panic! Ask PCAP to turn both processors off */
+ pxa_gpio_set_value(GPIO_WDI_AP, 0);