[openfirmware] [commit] r2977 - cpu/arm/olpc
repository service
svn at openfirmware.info
Wed May 16 13:03:22 CEST 2012
Author: quozl
Date: Wed May 16 13:03:21 2012
New Revision: 2977
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2977
Log:
OLPC XO-1.75 - IDT1338 DS1338 RTC SRAM clear, check for a two byte signature at the end of SRAM, and if it is missing clear the century byte (not maintained by the RTC), and the area we are using for "CMOS".
Modified:
cpu/arm/olpc/rtc.fth
Modified: cpu/arm/olpc/rtc.fth
==============================================================================
--- cpu/arm/olpc/rtc.fth Tue May 15 13:23:11 2012 (r2976)
+++ cpu/arm/olpc/rtc.fth Wed May 16 13:03:21 2012 (r2977)
@@ -21,6 +21,15 @@
headerless
+: ?clear
+ h# 3f rtc@ h# 3e rtc@ bwjoin h# 55aa <> if
+ h# 20 8 rtc! \ century
+ 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
+ then
+;
+
headers
: open ( -- okay )
0 ['] rtc@ catch if ( x )
@@ -29,8 +38,6 @@
\ Ensure that the Clock Halt bit is off
dup h# 80 and if ( value )
- \ Clear century
- h# 20 8 rtc!
\ Turn off Clock Halt
h# 7f and 0 rtc! ( )
\ Verify that it went off
@@ -40,6 +47,7 @@
else ( value )
drop true ( true )
then ( okay? )
+ ?clear
;
: close ( -- )
;
More information about the openfirmware
mailing list