Author: quozl Date: Mon Apr 29 08:02:14 2013 New Revision: 3651 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3651
Log: OLPC XO-1 - suppress the RTC amnesia check introduced in r3649, because the VRT bit works fine, and the century value at 0x1a is occasionally cleared by a power cycle. This clearing is ingored by ds1385r.fth get-time, which forces the returned century to 0x20. Curiously, the century value at 0x32 (as set by MSR 5140.0057) is not used in ds1385r.fth, and keeps what Linux set it to.
Modified: cpu/x86/pc/olpc/via/config.fth dev/ds1385r.fth
Modified: cpu/x86/pc/olpc/via/config.fth ============================================================================== --- cpu/x86/pc/olpc/via/config.fth Mon Apr 29 07:55:38 2013 (r3650) +++ cpu/x86/pc/olpc/via/config.fth Mon Apr 29 08:02:14 2013 (r3651) @@ -3,6 +3,7 @@
create olpc \ OLPC-specific build create olpc-cl1 +create olpc-xo-1.5
create compute-timings \ create demo-board
Modified: dev/ds1385r.fth ============================================================================== --- dev/ds1385r.fth Mon Apr 29 07:55:38 2013 (r3650) +++ dev/ds1385r.fth Mon Apr 29 08:02:14 2013 (r3651) @@ -88,6 +88,7 @@ cr then ; +[ifdef] olpc-xo-1.5 \ : $?lost ( flag head$ -- flag ) \ 2 pick if ." RTC amnesia - " type cr else 2drop then \ ; @@ -112,6 +113,7 @@ d# 10 rtc@ h# 70 and rega-mode h# 70 and <> \ " divider" $?lost or ; +[then] : reinit h# 20 h# 1a rtc! \ century h# 13 h# 9 rtc! \ year @@ -128,7 +130,9 @@ : open ( -- true ) my-unit 2 " map-in" $call-parent is rtc-adr first-open? if - amnesia? if reinit then + [ifdef] olpc-xo-1.5 + amnesia? if reinit then + [then] rega-mode d# 10 rtc! regb-mode d# 11 rtc! \ If the battery is bad, display a message, but go open the device anyway
openfirmware@openfirmware.info