[openfirmware] [commit] r3608 - cpu/arm/olpc dev
repository service
svn at openfirmware.info
Fri Mar 15 05:26:35 CET 2013
Author: quozl
Date: Fri Mar 15 05:26:35 2013
New Revision: 3608
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3608
Log:
OLPC - set the month and day registers of the RTC when it is being initialised on XO-1.75 and XO-4, and add initialisation in response to RTC power loss on XO-1 and XO-1.5.
Modified:
cpu/arm/olpc/rtc.fth
dev/ds1385r.fth
Modified: cpu/arm/olpc/rtc.fth
==============================================================================
--- cpu/arm/olpc/rtc.fth Wed Mar 13 06:31:30 2013 (r3607)
+++ cpu/arm/olpc/rtc.fth Fri Mar 15 05:26:35 2013 (r3608)
@@ -14,7 +14,10 @@
: ?clear
h# 3f rtc@ h# 3e rtc@ bwjoin h# 55aa <> if
- h# 20 8 rtc! \ century
+ h# 20 h# 8 rtc! \ century
+ h# 13 h# 9 rtc! \ year
+ h# 1 h# 8 rtc! \ month
+ h# 1 h# 7 rtc! \ day
h# 20 h# 10 do 0 i rtc! loop \ wipe cmos@ cmos! area
h# 55aa wbsplit h# 3e rtc! h# 3f rtc!
." RTC SRAM cleared" cr
Modified: dev/ds1385r.fth
==============================================================================
--- dev/ds1385r.fth Wed Mar 13 06:31:30 2013 (r3607)
+++ dev/ds1385r.fth Fri Mar 15 05:26:35 2013 (r3608)
@@ -88,6 +88,13 @@
cr
then
;
+: reinit
+ h# 20 h# 1a rtc!
+ h# 13 h# 9 rtc!
+ h# 1 h# 8 rtc!
+ h# 1 h# 7 rtc!
+ ." RTC cleared" cr
+;
true value first-open?
headers
: open ( -- true )
@@ -96,7 +103,7 @@
rega-mode d# 10 rtc!
regb-mode d# 11 rtc!
\ If the battery is bad, display a message, but go open the device anyway
- check-battery battery-message drop
+ check-battery battery-message if reinit then
false to first-open?
then
true
More information about the openfirmware
mailing list