Author: wmb
Date: Tue Aug 2 19:55:53 2011
New Revision: 2404
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2404
Log:
OLPC XO-1.75 - fixed camera driver - it was broken by the VA != PA conversion.
Modified:
dev/olpc/mmp2camera/ccic.fth
Modified: dev/olpc/mmp2camera/ccic.fth
==============================================================================
--- dev/olpc/mmp2camera/ccic.fth Tue Aug 2 07:25:19 2011 (r2403)
+++ dev/olpc/mmp2camera/ccic.fth Tue Aug 2 19:55:53 2011 (r2404)
@@ -138,6 +138,7 @@
;
: open ( -- flag )
+ my-address my-space h# 1000 " map-in" $call-parent to camera-base
init
ov7670-detected? 0= if false exit then
alloc-dma-bufs
@@ -252,7 +253,6 @@
: selftest ( -- error? )
open 0= if true exit then
- my-address my-space h# 1000 " map-in" $call-parent to camera-base
d# 300 ms
start-display
unmirrored shoot-still ?dup if close exit then ( error? )
Author: wmb
Date: Tue Aug 2 05:31:12 2011
New Revision: 2399
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2399
Log:
OLPC - SPI FLASH high level driver - reverted svn 2396 because
a) The changes therein caused an unwanted message to appear in the case where the retry code was automatically recovering from the id error
and
b) Knowing the precise value of the bad ID did not turn out to be interesting
The actual problem has been fixed and will be checked in next.
Modified:
dev/olpc/spiflash/spiflash.fth
Modified: dev/olpc/spiflash/spiflash.fth
==============================================================================
--- dev/olpc/spiflash/spiflash.fth Tue Aug 2 01:56:30 2011 (r2398)
+++ dev/olpc/spiflash/spiflash.fth Tue Aug 2 05:31:12 2011 (r2399)
@@ -280,7 +280,7 @@
." If you power cycle and try again, it will probably work the next time." cr
abort
endof
- ( default ) ." Unsupported SPI FLASH ID " dup .x cr abort
+ ( default ) true abort" Unsupported SPI FLASH ID"
endcase
to write-spi-flash
0 spi-write-status \ Turn off write protect bits
Author: quozl
Date: Tue Aug 2 01:56:30 2011
New Revision: 2398
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2398
Log:
OLPC XO-1.75 - change final function USB test order for CL2 to match CL1B, remove test mask, implement a test sequence property.
Modified:
cpu/arm/olpc/1.75/usb.fth
dev/usb2/hcd/probehub.fth
Modified: cpu/arm/olpc/1.75/usb.fth
==============================================================================
--- cpu/arm/olpc/1.75/usb.fth Mon Aug 1 21:11:37 2011 (r2397)
+++ cpu/arm/olpc/1.75/usb.fth Tue Aug 2 01:56:30 2011 (r2398)
@@ -16,11 +16,15 @@
: otg-set-host-mode 3 h# a8 ehci-reg! ; \ Force host mode
' otg-set-host-mode to set-host-mode
- \ Port 1 on the hub (bit 0) is connected to unused pins on the
- \ WLAN connector, so testing it is confusing
- h# e " hub-port-mask" integer-property
+ \ Port 1 on the hub is connected to unused pins on the WLAN connector,
+ \ so testing it is confusing
+ \ Port 2 is right upper
+ \ Port 3 is left
+ \ Port 4 is right lower
+ h# 03.04.02.00 " hub-port-seq" integer-property
+
end-package
-
+
d# 300 config-int usb-delay \ Milliseconds to wait before probing hub ports
devalias u /usb/disk
Modified: dev/usb2/hcd/probehub.fth
==============================================================================
--- dev/usb2/hcd/probehub.fth Mon Aug 1 21:11:37 2011 (r2397)
+++ dev/usb2/hcd/probehub.fth Tue Aug 2 01:56:30 2011 (r2398)
@@ -188,46 +188,57 @@
probe-teardown ( error? )
;
-0 value hub-test-mask
+: (hub-selftest) ( port -- stop? )
+ >r
+ hub-dev parent-set-target ( )
+ r@ get-port-status if ( )
+ ." Get-port-status failed for hub port " r@ u. cr
+ r> drop true exit ( -- true )
+ then ( )
+ hub-buf c@ 8 and if \ Connected ( )
+ ." Hub port " r@ u. ." in over current" cr
+ r> drop true exit ( -- true )
+ then ( )
+ hub-buf c@ 1 and if \ Connected ( )
+ ." Hub port " r@ u. ." in use" cr ( )
+ else ( )
+ diagnostic-mode? if ( )
+ ." Please connect a device to USB hub port " r@ u. cr ( )
+ r@ wait-hub-connect if r> drop true exit then ( )
+ else ( )
+ ." Fisheye pattern out to USB hub port " r@ u. cr ( )
+ r@ 4 test-hub-port ( )
+ d# 2,000 ms ( )
+ r@ untest-hub-port ( )
+ r@ reset-hub-port r@ power-hub-port ( )
+ then ( )
+ then ( )
+ r> drop false
+;
+
: hub-selftest ( hub-dev -- error? )
- to hub-dev ( )
+ to hub-dev ( )
+
+ " hub-port-seq" get-inherited-property if ( )
+ hub-#ports 1+ 1 ?do ( )
+ i (hub-selftest) if true unloop exit then
+ loop ( )
+ else ( propval$ )
+ decode-int nip nip ( seq )
+
+ 4 0 do
+ dup h# ff000000 and d# 24 rshift h# ff and ( seq port )
+ dup if ( seq port )
+ (hub-selftest) if true exit then
+ else
+ drop
+ then ( seq )
+ d# 8 lshift ( seq' )
+ loop
+ then
- " hub-port-mask" get-inherited-property if ( )
- -1 ( mask )
- else ( propval$ )
- decode-int nip nip ( mask )
- then ( mask )
- to hub-test-mask ( )
-
- hub-#ports 1+ 1 ?do ( )
- 1 i 1- lshift hub-test-mask and if
- hub-dev parent-set-target ( )
- i get-port-status if ( )
- ." Get-port-status failed for hub port " i u. cr
- true unloop exit ( -- true )
- then ( )
- hub-buf c@ 8 and if \ Connected ( )
- ." Hub port " i u. ." in over current" cr
- true unloop exit ( -- true )
- then ( )
- hub-buf c@ 1 and if \ Connected ( )
- ." Hub port " i u. ." in use" cr ( )
- else ( )
- diagnostic-mode? if ( )
- ." Please connect a device to USB hub port " i u. cr ( )
- i wait-hub-connect if true unloop exit then ( )
- else ( )
- ." Fisheye pattern out to USB hub port " i u. cr ( )
- i 4 test-hub-port ( )
- d# 2,000 ms ( )
- i untest-hub-port ( )
- i reset-hub-port i power-hub-port ( )
- then ( )
- then ( )
- then ( )
- loop ( )
- \ Mabye need to reset the entire hub here
- false ( false )
+ \ Maybe need to reset the entire hub here
+ false ( false )
;
: hub-selftest-xt ( -- xt ) ['] hub-selftest ;