Author: wmb
Date: Tue Nov 23 23:37:52 2010
New Revision: 2034
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2034
Log:
SDHCI - solidified support for SDHCI version 3 clock divisor layout and made 50 MHz operation work reasonably well for XO-1.75.
Modified:
cpu/arm/olpc/1.75/sdhci.fth
dev/mmc/sdhci/sdhci.fth
Modified: cpu/arm/olpc/1.75/sdhci.fth
==============================================================================
--- cpu/arm/olpc/1.75/sdhci.fth Tue Nov 23 23:34:45 2010 (r2033)
+++ cpu/arm/olpc/1.75/sdhci.fth Tue Nov 23 23:37:52 2010 (r2034)
@@ -5,16 +5,9 @@
fload ${BP}/cpu/arm/olpc/1.75/sdregs.fth
fload ${BP}/dev/mmc/sdhci/sdhci.fth
- true to avoid-high-speed?
+\ true to avoid-high-speed?
hex
- \ The new clock divisor layout is low 8 bits in [15:8] and high 2 bits in [7:6]
- \ The resulting 10-bit value is multiplied by 2 to form the divisor for the
- \ 200 MHz base clock.
- patch 403 103 card-clock-25 \ n is 4, divisor is 8, clk is 25 MHz
- patch 203 003 card-clock-50 \ n is 2, divisor is 4, clk is 50 MHz
- patch 043 8003 card-clock-slow \ n is h# 100 (high 2 bits in [7:6], for divisor of 512 from 200 MHz clock
-
: olpc-card-inserted? ( -- flag )
slot 1 = if d# 31 gpio-pin@ 0= else true then
;
Modified: dev/mmc/sdhci/sdhci.fth
==============================================================================
--- dev/mmc/sdhci/sdhci.fth Tue Nov 23 23:34:45 2010 (r2033)
+++ dev/mmc/sdhci/sdhci.fth Tue Nov 23 23:37:52 2010 (r2034)
@@ -135,20 +135,24 @@
: card-clock-on ( -- ) h# 2c cw@ 4 or h# 2c cw! ;
: card-clock-off ( -- ) h# 2c cw@ 4 invert and h# 2c cw! ;
+: sdhci-version3? ( -- flag ) h# fe cw@ h# ff and 2 >= ;
: card-clock-slow ( -- ) \ Less than 400 kHz, for init
card-clock-off
- h# 8003 h# 2c cw! \ Set divisor to 2^128, leaving internal clock on
+ \ Set divisor, leaving internal clock on
+ sdhci-version3? if h# 43 else h# 8001 then h# 2c cw!
card-clock-on
;
: card-clock-25 ( -- )
card-clock-off
- h# 103 h# 2c cw! \ Set divisor to 2^1, leaving internal clock on
+ \ Set divisor, leaving internal clock on
+ sdhci-version3? if h# 403 else h# 103 then h# 2c cw!
card-clock-on
;
: card-clock-50 ( -- )
card-clock-off
- h# 003 \ division = 2^0, clocks on
+ \ Set divisor, leaving internal clock on
+ sdhci-version3? if h# 203 else h# 001 then
?cafe-fpga-quirk
@@ -659,6 +663,7 @@
\ Ask if high-speed is supported
h# 00ff.fff1 switch-function d# 13 + c@ 2 and if \ cmd6
+ 2 ms
h# 80ff.fff1 switch-function drop \ Perform the switch cmd6
\ Bump the host controller clock
host-high-speed \ Changes the clock edge
Author: quozl
Date: Tue Nov 23 00:34:01 2010
New Revision: 2031
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2031
Log:
OLPC XO-1.5 - strobe HDD_LED# during fs-update. The LED is toggled once for each zblock: line in the input file. This shows the processing speed, and is affected initially by complexity of decompression, and eventually by SD card write rate. Faster and slower SD cards are more easily compared. Cost of 1.7 microseconds per LED toggle, but as writes to SD are asynchronous the run time is unchanged.
Modified:
cpu/x86/pc/olpc/via/fsupdate.fth
Modified: cpu/x86/pc/olpc/via/fsupdate.fth
==============================================================================
--- cpu/x86/pc/olpc/via/fsupdate.fth Tue Nov 23 00:32:06 2010 (r2030)
+++ cpu/x86/pc/olpc/via/fsupdate.fth Tue Nov 23 00:34:01 2010 (r2031)
@@ -64,7 +64,20 @@
vocabulary nand-commands
also nand-commands definitions
+: flash-led ( -- )
+ h# 4c acpi-l@
+ h# 400000 xor
+ h# 4c acpi-l!
+;
+
+: clear-led ( -- )
+ h# 4c acpi-l@
+ h# 400000 or
+ h# 4c acpi-l!
+;
+
: zblocks: ( "eblock-size" "#eblocks" ... -- )
+ flash-led
?compare-spec-line
get-hex# to /nand-block
get-hex# to #image-eblocks
@@ -87,6 +100,7 @@
" write-blocks-end" $call-nand ( error? )
" Write error" ?nand-abort
\ #image-eblocks erase-gap
+ clear-led
release-inflater
fexit
;
@@ -215,6 +229,7 @@
dup to last-eblock# ( eblock# )
show-written ( )
show-temperature
+ flash-led
;
previous definitions
Author: wmb
Date: Thu Nov 18 20:47:03 2010
New Revision: 2029
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2029
Log:
OLPC XO-1.75 - int and ext were swapped
Modified:
cpu/arm/olpc/1.75/devices.fth
Modified: cpu/arm/olpc/1.75/devices.fth
==============================================================================
--- cpu/arm/olpc/1.75/devices.fth Thu Nov 18 07:33:42 2010 (r2028)
+++ cpu/arm/olpc/1.75/devices.fth Thu Nov 18 20:47:03 2010 (r2029)
@@ -220,8 +220,8 @@
fload ${BP}/cpu/arm/olpc/1.75/sdhci.fth
-devalias int /sd/disk@1
-devalias ext /sd/disk@3
+devalias int /sd/disk@3
+devalias ext /sd/disk@1
devalias net /wlan \ XXX should report-net in case of USB Ethernet
fload ${BP}/dev/olpc/kb3700/spicmd.fth
Author: quozl
Date: Thu Nov 18 07:33:42 2010
New Revision: 2028
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2028
Log:
hack XO-1.75 build to work, two fixes that need review:
1. testicons.tgz was not found, ${BP} does not expand, so used a
relative path to get it from the other tree,
2. random1k is not present since ofpong.fth is not loaded, so use
get-msecs instead,
Modified:
cpu/arm/olpc/1.75/testicons.bth
ofw/fs/cifs/smb.fth
Modified: cpu/arm/olpc/1.75/testicons.bth
==============================================================================
--- cpu/arm/olpc/1.75/testicons.bth Thu Nov 18 05:55:36 2010 (r2027)
+++ cpu/arm/olpc/1.75/testicons.bth Thu Nov 18 07:33:42 2010 (r2028)
@@ -3,7 +3,7 @@
command: &builder &this
build-now
-" tar xfz ${BP}/cpu/x86/pc/olpc/via/testicons.tgz" expand$ $sh
+" tar xfz ../../../../../cpu/x86/pc/olpc/via/testicons.tgz" expand$ $sh
\ This forces the creation of a .log file, so we don't re-fetch
writing testicons.version
Modified: ofw/fs/cifs/smb.fth
==============================================================================
--- ofw/fs/cifs/smb.fth Thu Nov 18 05:55:36 2010 (r2027)
+++ ofw/fs/cifs/smb.fth Thu Nov 18 07:33:42 2010 (r2028)
@@ -89,9 +89,15 @@
0 instance value last-command
+[ifdef] random1k
+: random-pid random1k ;
+[else]
+: random-pid get-msecs ;
+[then]
+
: smb-init ( -- )
signature 8 erase
- random1k h# ffff and to pid
+ random-pid h# ffff and to pid
0 to tid
0 to mid
0 to uid