yes, it is still present:
flag@casper:~$ date '+%s'
1300104497
flag@casper:~$ sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"
flag@casper:~$ sudo sh -c "echo `date '+%s' -d '+ 5 minutes'` >
/sys/class/rtc/rtc0/wakealarm"
flag@casper:~$ cat /sys/class/rtc/rtc0/wakealarm
3824712805
flag@casper:~$ cat /proc/driver/rtc
rtc_time : 12:08:59
rtc_date : 2011-03-14
alrm_time : 12:13:25
alrm_date : 2091-03-14
alarm_IRQ : yes
alrm_pending : no
24hr : yes
and it is due to an erroneous mask operation when reading back the alarm from
the RTC register.
This following patch should fix it:
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c
index daf7c5e..8446717 100755
--- a/drivers/rtc/rtc-mv.c
+++ b/drivers/rtc/rtc-mv.c
@@ -112,7 +112,7 @@ static int mv_rtc_read_alarm(struct device *dev, struct
rtc_wkalrm *alm)
day = rtc_date & 0x3f;
month = (rtc_date >> RTC_MONTH_OFFS) & 0x3f;
- year = (rtc_date >> RTC_YEAR_OFFS) & 0xff;
+ year = (rtc_date >> RTC_YEAR_OFFS) & 0x7f;
alm->time.tm_sec = bcd2bin(second);
alm->time.tm_min = bcd2bin(minute);
i already forwarded it to our Marvell contact, waiting for feedback on
it.
Unfortunately, even with this patch, i cannot successfully make Casper
to resume, so more work is needed in this area.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/503546
Title:
Setting rtc wakealarm through sysfs interface fails
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs