summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2010-11-01 18:58:40 +0000
committerBertrik Sikken <bertrik@sikken.nl>2010-11-01 18:58:40 +0000
commitcec1e476e6c6696b79f9f7a5118e2dbb7b6191a7 (patch)
treea7761ae4b7274608b003e10703f9da1b4bcb864b
parentf2dbbf45de036dfbcbea8f2650a50bfc5d088ff1 (diff)
downloadrockbox-cec1e476e6c6696b79f9f7a5118e2dbb7b6191a7.tar.gz
rockbox-cec1e476e6c6696b79f9f7a5118e2dbb7b6191a7.tar.bz2
rockbox-cec1e476e6c6696b79f9f7a5118e2dbb7b6191a7.zip
Another (hopefully final) fix for FS#11453 (AMSv2 powerdown fails sometimes when wakeup timer set) by Fabian Vogel.
This fix disables MCLK before powerdown-for-wakeup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28435 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--docs/CREDITS1
-rw-r--r--firmware/drivers/rtc/rtc_as3514.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/docs/CREDITS b/docs/CREDITS
index 0f97fa72df..06f416553c 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -562,6 +562,7 @@ Tuomas Airaksinen
Calvin Walden
Michael Gentry
David Fowle
+Fabian Vogel
The libmad team
The wavpack team
diff --git a/firmware/drivers/rtc/rtc_as3514.c b/firmware/drivers/rtc/rtc_as3514.c
index 1e5321937e..44ef3cc4a1 100644
--- a/firmware/drivers/rtc/rtc_as3514.c
+++ b/firmware/drivers/rtc/rtc_as3514.c
@@ -142,6 +142,10 @@ void rtc_alarm_poweroff(void)
seconds -= tm.tm_sec;
+ /* disable MCLK, it is a wakeup source and prevents proper shutdown */
+ CGU_AUDIO = (2 << 0) | (1 << 11);
+ CGU_PLLBSUP = (1 << 2) | (1 << 3);
+
/* write wakeup register */
alarm.seconds = seconds;
alarm.enabled = true;