Author: quozl
Date: Tue Apr 2 04:46:16 2013
New Revision: 3633
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3633
Log:
OLPC - libertas, reduce the scan time to 30ms per channel for an active scan, and raise it to 110ms per channel for a passive scan, based on a kernel patch provided by Marvell.
Modified:
dev/libertas.fth
Modified: dev/libertas.fth
==============================================================================
--- dev/libertas.fth Thu Mar 28 12:34:12 2013 (…
[View More]r3632)
+++ dev/libertas.fth Tue Apr 2 04:46:16 2013 (r3633)
@@ -1166,9 +1166,10 @@
dup channel-is-5ghz? if 1 else 0 then ( channel# band# )
+xb \ Band #
+xb \ Channel #
- scan-type +xb \ Scan type - 0:active or 1:passive
- d# 100 +xw \ Min scan time
- d# 100 +xw \ Max scan time ( r: payload' )
+ scan-type dup +xb \ Scan type - 0:active or 1:passive
+ if d# 30 else d# 110 then
+ dup +xw \ Min scan time
+ +xw \ Max scan time ( r: payload' )
'x r@ - r> 2- le-w! ( )
;
[View Less]
Author: quozl
Date: Thu Mar 28 00:57:22 2013
New Revision: 3631
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3631
Log:
OLPC - avoid use of RTC undefined data, by detecting power loss and
clearing the RTC count.
XO-1 and XO-1.5 (ds1385): clear all the RTC count registers, not only
the date.
XO-1.75 and XO-4 (ds1338): force the century to 20 like on previous
models, check and clear the oscillator stop flag, clear all the RTC
count registers, separate the clearing of RTC SRAM …
[View More]from the clearing
of RTC count, and fix a regression in r3608 where the wrong register
offsets were used.
Modified:
cpu/arm/olpc/rtc.fth
dev/ds1385r.fth
Modified: cpu/arm/olpc/rtc.fth
==============================================================================
--- cpu/arm/olpc/rtc.fth Tue Mar 26 07:26:33 2013 (r3630)
+++ cpu/arm/olpc/rtc.fth Thu Mar 28 00:57:22 2013 (r3631)
@@ -12,12 +12,20 @@
headerless
+: reinit
+ h# 20 h# 8 rtc! \ century
+ h# 13 h# 6 rtc! \ year
+ h# 1 h# 5 rtc! \ month
+ h# 1 h# 4 rtc! \ day of month
+ h# 2 h# 3 rtc! \ day of week, monday
+ h# 0 h# 2 rtc! \ hours
+ h# 0 h# 1 rtc! \ minutes
+ h# 0 h# 0 rtc! \ seconds
+ ." RTC cleared" cr
+;
+
: ?clear
h# 3f rtc@ h# 3e rtc@ bwjoin h# 55aa <> if
- 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
@@ -44,6 +52,12 @@
drop true ( true )
then ( okay? )
+ \ check and clear the oscillator stop flag
+ 7 rtc@ h# 20 and if
+ reinit
+ 7 rtc@ h# 20 invert and 7 rtc!
+ then
+
\ manage legacy RTC CMOS usage
?clear
@@ -69,6 +83,7 @@
bcd-time&date >r >r >r >r >r >r
bcd> r> bcd> r> bcd> r> bcd> r> bcd> r> bcd> r> bcd> ( s m h d m y c )
+ d# 20 max
d# 100 * + \ Merge century with year
;
: set-time ( s m h d m y -- )
Modified: dev/ds1385r.fth
==============================================================================
--- dev/ds1385r.fth Tue Mar 26 07:26:33 2013 (r3630)
+++ dev/ds1385r.fth Thu Mar 28 00:57:22 2013 (r3631)
@@ -89,10 +89,14 @@
then
;
: reinit
- h# 20 h# 1a rtc!
- h# 13 h# 9 rtc!
- h# 1 h# 8 rtc!
- h# 1 h# 7 rtc!
+ h# 20 h# 1a rtc! \ century
+ h# 13 h# 9 rtc! \ year
+ h# 1 h# 8 rtc! \ month
+ h# 1 h# 7 rtc! \ day of the month
+ h# 2 h# 6 rtc! \ day of week, monday
+ h# 0 h# 4 rtc! \ hours
+ h# 0 h# 2 rtc! \ minutes
+ h# 0 h# 0 rtc! \ seconds
." RTC cleared" cr
;
true value first-open?
@@ -137,13 +141,7 @@
bcd-time&date >r >r >r >r >r >r
bcd> r> bcd> r> bcd> r> bcd> r> bcd> r> bcd> r> bcd> ( s m h d m y c )
- \ We allow the century byte to force the year to 20xx, but not to force
- \ it to 19xx, because that would cause a problem when the century
- \ rolls over.
- dup d# 20 <> if
- drop dup d# 94 < if d# 20 else d# 19 then
- then
-
+ d# 20 max
d# 100 * + \ Merge century with year
;
: set-time ( s m h d m y -- )
[View Less]