[OpenBIOS] r497 - dev/mmc/sdhci

svn at openbios.org svn at openbios.org
Thu Jul 26 08:42:10 CEST 2007


Author: wmb
Date: 2007-07-26 08:42:10 +0200 (Thu, 26 Jul 2007)
New Revision: 497

Modified:
   dev/mmc/sdhci/sdhci.fth
Log:
OLPC trac 2371 - SD is flaky in high-speed (50 MHz) mode on B1,
probably as a result of the FPGA-based CaFe chips on B1.
The firmware fix is to check for a B1 system and avoid switching
to 50 MHz card clock thereon.



Modified: dev/mmc/sdhci/sdhci.fth
===================================================================
--- dev/mmc/sdhci/sdhci.fth	2007-07-26 01:14:50 UTC (rev 496)
+++ dev/mmc/sdhci/sdhci.fth	2007-07-26 06:42:10 UTC (rev 497)
@@ -154,7 +154,12 @@
 ;
 : card-clock-50  ( -- )
    card-clock-off
-   h# 003 h# 2c cw!   \ Set divisor to 2^0, leaving internal clock on
+   h# 003     \ division = 2^0, clocks on
+
+   \ OLPC-specific hack: fast clock doesn't work on the FPGA CaFe chip
+   " board-revision" evaluate h# b20 <  if  drop h# 103  then
+
+   h# 2c cw!   \ Set divisor to 2^0, leaving internal clock on
    card-clock-on
 ;
 




More information about the OpenBIOS mailing list