The wday is configured only when disabled alarm.
When enable alarm, set it to its default reset value 0x01,
and not enable it, to prevent an error happened when re-read the
alarm value into the virtualized generic layer at boot up in
reading alarm setting of RTC.
Bug
1034871
Change-Id: I8bfa997653edaaa286cf768c1827b5ab986f52cc
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: http://git-master/r/129398
(cherry picked from commit
1a61c310b66245a73e021d786eea45c31cd9f6e9)
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Change-Id: Ifa78078c6387689d12fe1aade8a9c531fef4f771
Reviewed-on: http://git-master/r/131130
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Rebase-Id: R495bc7741a8c90891f27e158af9ebdbcd820db97
/* The wday is configured only when disabled alarm. */
if (!alarm)
buf[RTC_WEEKDAY] = (1 << tm->tm_wday);
- else
- buf[RTC_WEEKDAY] = 0;
-
+ else {
+ /* Configure its default reset value 0x01, and not enable it. */
+ buf[RTC_WEEKDAY] = 0x01;
+ }
return 0;
}