From: <hap...@us...> - 2007-07-27 23:13:43
|
Revision: 1209 http://hackndev.svn.sourceforge.net/hackndev/?rev=1209&view=rev Author: happy-slapin Date: 2007-07-27 16:13:41 -0700 (Fri, 27 Jul 2007) Log Message: ----------- z72: some smoked code: * Sleep mode works now! Requires proper testing though. * Recovering 1 location which broke kernel task wakeup handling because PalmOS bl overwrite it. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c linux4palm/linux/trunk/arch/arm/mach-pxa/pxa27x.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-24 17:44:21 UTC (rev 1208) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c 2007-07-27 23:13:41 UTC (rev 1209) @@ -52,8 +52,16 @@ /* Turn off USB power */ SET_PALMZ72_GPIO(USB_POWER,0); + /* hold current GPIO levels for now + * TODO: find out what we can disable. + */ + PGSR0 = GPLR0; + PGSR1 = GPLR1; + PGSR2 = GPLR2; + PGSR3 = GPLR3; /* disable GPIO reset - DO NOT REMOVE! */ + /* not it, but we can't sleep otherwise */ PCFR &= PCFR_GPR_EN; return 0; @@ -107,7 +115,7 @@ .domain_access = 0, .process_id = 0, }; - +static unsigned long store_ptr; static void palmz72_pxa_ll_pm_suspend(unsigned long resume_addr) { /* hold current GPIO levels on outputs */ @@ -118,11 +126,14 @@ /* setup the resume_info struct for the original bootloader */ palmz72_resume_info.resume_addr = resume_addr; + printk(KERN_INFO "PSPR=%lu\n", virt_to_phys(&palmz72_resume_info)); + store_ptr = *((unsigned long *)0xc0000050); PSPR = virt_to_phys(&palmz72_resume_info); } static void palmz72_pxa_ll_pm_resume(void) { + *((unsigned long *)0xc0000050) = store_ptr; /* For future */ } Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/pxa27x.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/pxa27x.c 2007-07-24 17:44:21 UTC (rev 1208) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/pxa27x.c 2007-07-27 23:13:41 UTC (rev 1209) @@ -153,7 +153,7 @@ break; case PM_SUSPEND_MEM: if(machine_is_xscale_palmld() || machine_is_xscale_palmtx() || - machine_is_palmz72() || machine_is_xscale_palmtt5()) { + machine_is_xscale_palmtt5()) { /* For safety. suspend_mem puts the device in an unresetable * state. * On TX one needs to desolder the battery to get out of it. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |