[openfirmware] [commit] r1934 - dev/mmc/sdhci
repository service
svn at openfirmware.info
Wed Aug 11 10:50:38 CEST 2010
Author: wmb
Date: Wed Aug 11 10:50:37 2010
New Revision: 1934
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1934
Log:
SD driver - added the ability to disable high-speed operation on specific platforms.
Modified:
dev/mmc/sdhci/sdhci.fth
Modified: dev/mmc/sdhci/sdhci.fth
==============================================================================
--- dev/mmc/sdhci/sdhci.fth Wed Aug 11 10:48:52 2010 (r1933)
+++ dev/mmc/sdhci/sdhci.fth Wed Aug 11 10:50:37 2010 (r1934)
@@ -643,6 +643,24 @@
h# e data-timeout! \ 2^26 / 48 MHz = 1.4 sec
;
+false value avoid-high-speed?
+: set-speed ( -- )
+ avoid-high-speed? if
+ card-clock-25
+ exit
+ then
+
+ \ Ask if high-speed is supported
+ h# 00ff.fff1 switch-function d# 13 + c@ 2 and if \ cmd6
+ h# 80ff.fff1 switch-function drop \ Perform the switch cmd6
+ \ Bump the host controller clock
+ host-high-speed \ Changes the clock edge
+ card-clock-50
+ else
+ card-clock-25
+ then
+;
+
: configure-transfer ( -- )
mmc? if
1-bit
@@ -660,15 +678,7 @@
\ 1 for v1.10, and 2 for v2.
get-scr c@ h# f and 0= if exit then \ acmd51
- \ Ask if high-speed is supported
- h# 00ff.fff1 switch-function d# 13 + c@ 2 and if \ cmd6
- h# 80ff.fff1 switch-function drop \ Perform the switch cmd6
- \ Bump the host controller clock
- host-high-speed \ Changes the clock edge
- card-clock-50
- else
- card-clock-25
- then
+ set-speed
then
;
More information about the openfirmware
mailing list