|
From: <bob...@us...> - 2007-07-21 07:50:07
|
Revision: 1189
http://svn.sourceforge.net/hackndev/?rev=1189&view=rev
Author: bobofdoom
Date: 2007-07-21 00:50:05 -0700 (Sat, 21 Jul 2007)
Log Message:
-----------
PalmZ72: Added logic that (should) enable waking from sleep to RAM via original bootloader.
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c 2007-07-20 15:51:04 UTC (rev 1188)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c 2007-07-21 07:50:05 UTC (rev 1189)
@@ -52,7 +52,7 @@
/* Turn off USB power */
SET_PALMZ72_GPIO(USB_POWER,0);
-
+
/* disable GPIO reset - DO NOT REMOVE! */
PCFR &= PCFR_GPR_EN;
@@ -85,10 +85,40 @@
#define palmz72_resume NULL
#endif
+static struct {
+ u32 magic0; /* 0x0 */
+ u32 magic1; /* 0x4 */
+ u32 resume_addr; /* 0x8 */
+ u32 pad[11]; /* 0xc..0x37 */
+
+ u32 arm_control; /* 0x38 */
+ u32 aux_control; /* 0x3c */
+ u32 ttb; /* 0x40 */
+ u32 domain_access; /* 0x44 */
+ u32 process_id; /* 0x48 */
+} palmz72_resume_info = {
+ .magic0 = 0xb4e6,
+ .magic1 = 1,
+
+ /* reset state, MMU off etc */
+ .arm_control = 0,
+ .aux_control = 0,
+ .ttb = 0,
+ .domain_access = 0,
+ .process_id = 0,
+};
+
static void palmz72_pxa_ll_pm_suspend(unsigned long resume_addr)
{
- /* For future */
- return;
+ /* hold current GPIO levels on outputs */
+ PGSR0 = GPLR0;
+ PGSR1 = GPLR1;
+ PGSR2 = GPLR2;
+ PGSR3 = GPLR3;
+
+ /* setup the resume_info struct for the original bootloader */
+ palmz72_resume_info.resume_addr = resume_addr;
+ PSPR = virt_to_phys(&palmz72_resume_info);
}
static void palmz72_pxa_ll_pm_resume(void)
@@ -104,6 +134,9 @@
static int palmz72_pm_probe(struct device *dev)
{
printk(KERN_NOTICE "PalmOne Zire72 power management driver registered\n");
+#ifdef CONFIG_PM
+ pxa_pm_set_ll_ops(&palmz72_ll_pm_ops);
+#endif
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|