Author: quozl
Date: Thu Jul 29 08:41:04 2010
New Revision: 1897
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1897
Log:
SDHCI - Increased AData workaround timeout to 1200 uS, thus making the system work with 8G Adata cards while even further destroying write performance for every card.
Modified:
dev/mmc/sdhci/sdhci.fth
Modified: dev/mmc/sdhci/sdhci.fth
==============================================================================
--- dev/mmc/sdhci/sdhci.fth Thu Jul 22 09:02:07 2010 (r1896)
+++ dev/mmc/sdhci/sdhci.fth Thu Jul 29 08:41:04 2010 (r1897)
@@ -904,7 +904,7 @@
else ( block# r: #blocks fresh? )
\ Ugly ugly workaround for a problem with AData Class 6 SD cards
\ They hang (data timeout) if you start a write too soon after a read.
- " d# 900 us" evaluate
+ " d# 1200 us" evaluate
r> if r> pre-write-erase else r> drop then ( block# )
write-multiple true to writing? ( )
then ( )
Author: wmb
Date: Thu Jul 22 08:42:19 2010
New Revision: 1894
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1894
Log:
SDHCI - Increased AData workaround timeout to 900 uS, thus making the system work with 8G Adata cards while killing the write performance for every card.
Modified:
dev/mmc/sdhci/sdhci.fth
Modified: dev/mmc/sdhci/sdhci.fth
==============================================================================
--- dev/mmc/sdhci/sdhci.fth Tue Jul 20 05:49:44 2010 (r1893)
+++ dev/mmc/sdhci/sdhci.fth Thu Jul 22 08:42:19 2010 (r1894)
@@ -904,7 +904,7 @@
else ( block# r: #blocks fresh? )
\ Ugly ugly workaround for a problem with AData Class 6 SD cards
\ They hang (data timeout) if you start a write too soon after a read.
- " d# 20 us" evaluate
+ " d# 900 us" evaluate
r> if r> pre-write-erase else r> drop then ( block# )
write-multiple true to writing? ( )
then ( )
Author: wmb
Date: Tue Jul 20 01:36:41 2010
New Revision: 1890
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1890
Log:
SDHCI driver - set the data timeout early in the card attach process because that seems to prevent spurious data timeouts from the Via VX855 chip.
Modified:
dev/mmc/sdhci/sdhci.fth
Modified: dev/mmc/sdhci/sdhci.fth
==============================================================================
--- dev/mmc/sdhci/sdhci.fth Tue Jul 20 01:33:51 2010 (r1889)
+++ dev/mmc/sdhci/sdhci.fth Tue Jul 20 01:36:41 2010 (r1890)
@@ -123,7 +123,6 @@
;
: internal-clock-off ( -- ) h# 2c cw@ 1 invert and h# 2c cw! ;
-
: card-clock-on ( -- ) h# 2c cw@ 4 or h# 2c cw! ;
: card-clock-off ( -- ) h# 2c cw@ 4 invert and h# 2c cw! ;
@@ -227,6 +226,11 @@
0 instance value timeout?
: .sderror ( isr -- )
+ debug? if
+ ." Chip registers: " cr
+ chip h# 80 " ldump" evaluate cr
+ then
+
esr@ dup esr! ( isr esr )
dup 1 and if ( isr esr )
@@ -254,6 +258,8 @@
: isr-event? ( mask -- happened? )
h# 8000 or ( mask' )
isr@ 2dup and if ( mask' isr )
+ dup h# 8000 and if dup .sderror then ( mask isr )
+
\ Only clear the bits we will handle this time.
\ If additional ISR bits are set, leave them set because
\ later code will be waiting for them. In practice, the
@@ -261,9 +267,8 @@
\ bit - mask 2 - which "2 wait" will handle.
\ But we do go ahead and clear card removal/insertion
\ events, because we don't handle them elsewhere.
- swap h# c0 or over and isr! ( isr )
+ swap h# c0 or and isr! ( )
- dup h# 8000 and if .sderror else drop then ( )
true
else ( mask' isr )
\ DMA interrupt - the transfer crossed an address boundary
@@ -282,6 +287,8 @@
8 and if 0 cl@ 0 cl! 8 isr! then ( mask )
repeat ( mask isr )
+ dup h# 8000 and if dup .sderror then ( mask isr )
+
\ Only clear the bits we will handle this time.
\ If additional ISR bits are set, leave them set because
\ later code will be waiting for them. In practice, the
@@ -289,9 +296,7 @@
\ bit - mask 2 - which "2 wait" will handle.
\ But we do go ahead and clear card removal/insertion
\ events, because we don't handle them elsewhere.
- swap h# c0 or over and isr! ( isr )
-
- dup h# 8000 and if .sderror else drop then ( )
+ swap h# c0 or and isr! ( )
;
: wait-ready ( -- )
@@ -729,6 +734,7 @@
card-power-on d# 40 ms \ This delay is just a guess (20 was barely too slow for a Via board)
card-inserted? 0= if card-power-off intstat-off false true exit then
card-clock-slow d# 10 ms \ This delay is just a guess
+
reset-card \ Cmd 0
set-operating-conditions if intstat-off true true exit then
false
@@ -781,6 +787,8 @@
: attach-card ( -- okay? )
setup-host
+ set-timeout
+
['] power-up-card catch if true true then if ( retry? )
\ The first try at powering up failed.
if ( )
@@ -816,8 +824,6 @@
select-card \ Cmd 7 - Select
- set-timeout
-
configure-transfer
intstat-off
Author: wmb
Date: Tue Jul 20 01:33:51 2010
New Revision: 1889
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1889
Log:
OLPC keyboard driver - Don't send the F4 (enable scan) command as it sometimes confuses the EC.
Modified:
dev/pckbd.fth
Modified: dev/pckbd.fth
==============================================================================
--- dev/pckbd.fth Tue Jul 20 01:32:54 2010 (r1888)
+++ dev/pckbd.fth Tue Jul 20 01:33:51 2010 (r1889)
@@ -450,12 +450,12 @@
\ 7 set-leds d# 100 ms 0 set-leds
then
-[then]
\ Leave the keyboard in scan set 2 (its default state), but also leave
\ the 8042 in the mode where it translates to scan set 1.
keyboard-present? if enable-scan then
+[then]
true to keyboard-probed?
;