cpufreq: gps && rxerr: port=1 ch=0x24, rxs=0x00000001

Rask Ingemann Lambertsen rask at sygehus.dk
Tue Jun 23 02:58:22 CEST 2009


On Thu, Jun 18, 2009 at 07:52:11PM +0200, Michael Trimarchi wrote:

> I look at the ticket. Is the order of restoring
> of clockdivn and mpllcon important?

   In danish, we have an expression which translates approximately to "being
unable to see the wood for mere trees". The bug is not so much the order in
which clockdivn and mpllcon are restored, but that they are not being saved
and restored at all across suspends. You even posted the buggy code:

> #ifndef CONFIG_CPU_FREQ
>        SAVE_ITEM(S3C2410_CLKDIVN),
>        SAVE_ITEM(S3C2410_MPLLCON),
>        SAVE_ITEM(S3C2410_REFRESH),
> #endif

   The obvious patch indeed makes suspend/resume work again:

diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c
index 834e54d..e21a2be 100644
--- a/arch/arm/plat-s3c24xx/pm.c
+++ b/arch/arm/plat-s3c24xx/pm.c
@@ -66,9 +66,9 @@ static struct sleep_save core_save[] = {
 	SAVE_ITEM(S3C2410_BANKCON3),
 	SAVE_ITEM(S3C2410_BANKCON4),
 	SAVE_ITEM(S3C2410_BANKCON5),
 
-#ifndef CONFIG_CPU_FREQ
+#if (!defined(CONFIG_CPU_FREQ)) || defined(CONFIG_CPU_FREQ_S3C24XX)
 	SAVE_ITEM(S3C2410_CLKDIVN),
 	SAVE_ITEM(S3C2410_MPLLCON),
 	SAVE_ITEM(S3C2410_REFRESH),
 #endif

   We should probably save and restore CAMDIVN too, but I haven't tested
that yet.

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year



More information about the openmoko-kernel mailing list