Author: wmb
Date: Thu Jul 14 09:32:36 2011
New Revision: 2364
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2364
Log:
OLPC XO-1.75 - Double-probe the USB the first time with a little delay in-between, thus giving devices behind the hub a bit of wakeup time. In particular, this helps with USB barcode scanners.
Modified:
cpu/arm/olpc/1.75/usb.fth
Modified: cpu/arm/olpc/1.75/usb.fth
==============================================================================
--- cpu/arm/olpc/1.75/usb.fth Thu Jul 14 08:31:33 2011 (r2363)
+++ cpu/arm/olpc/1.75/usb.fth Thu Jul 14 09:32:36 2011 (r2364)
@@ -53,11 +53,20 @@
then
;
+true value first-usb-probe?
+: (silent-probe-usb) ( -- ) " /" ['] (probe-usb2) scan-subtree ;
: silent-probe-usb ( -- )
- " /" ['] (probe-usb2) scan-subtree
+ (silent-probe-usb)
report-disk report-net report-keyboard
;
: probe-usb ( -- )
+ first-usb-probe? if
+ false to first-usb-probe?
+ \ Initial probe to awaken the hub
+ (silent-probe-usb)
+ \ A little delay to let slow devices like USB scanner wake up
+ d# 150 ms
+ then
silent-probe-usb
." USB devices:" cr
Author: wmb
Date: Thu Jul 14 08:14:19 2011
New Revision: 2362
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2362
Log:
OLPC XO-1.75 - RTC driver - force the Clock Halt bit off if necessary, and verify that it worked.
Modified:
cpu/arm/olpc/1.75/rtc.fth
Modified: cpu/arm/olpc/1.75/rtc.fth
==============================================================================
--- cpu/arm/olpc/1.75/rtc.fth Thu Jul 14 07:39:10 2011 (r2361)
+++ cpu/arm/olpc/1.75/rtc.fth Thu Jul 14 08:14:19 2011 (r2362)
@@ -1,3 +1,5 @@
+purpose: Driver for external IDT1338 RTC chip on XO-1.75
+
0 0 " " " /" begin-package
" rtc" name
@@ -20,8 +22,22 @@
headerless
headers
-: open ( -- true )
- true
+: open ( -- okay )
+ 0 ['] rtc@ catch if ( x )
+ drop false exit ( -- false )
+ then ( value )
+
+ \ Ensure that the Clock Halt bit is off
+ dup h# 80 and if ( value )
+ \ Turn off Clock Halt
+ h# 7f and 0 rtc! ( )
+ \ Verify that it went off
+ 0 rtc@ h# 80 and ( error? )
+ dup if ." RTC Clock Halt is stuck on" cr then ( error? )
+ 0= ( okay? )
+ else ( value )
+ drop true ( true )
+ then ( okay? )
;
: close ( -- )
;