Author: wmb Date: Wed Aug 1 10:23:34 2012 New Revision: 3111 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3111
Log: OLPC CL4 - Various fixes for SD. eMMC is now working.
Modified: cpu/arm/olpc/cl4/fw.bth cpu/arm/olpc/sdhci.fth dev/mmc/sdhci/sdhci.fth
Modified: cpu/arm/olpc/cl4/fw.bth ============================================================================== --- cpu/arm/olpc/cl4/fw.bth Wed Aug 1 10:22:27 2012 (r3110) +++ cpu/arm/olpc/cl4/fw.bth Wed Aug 1 10:23:34 2012 (r3111) @@ -36,17 +36,19 @@
dev /sd new-device - 4 encode-int " reg" property + 1 encode-int " reg" property fload ${BP}/dev/mmc/sdhci/sdmmc.fth fload ${BP}/dev/mmc/sdhci/selftest.fth - " internal" " slot-name" string-property + " external" " slot-name" string-property finish-device device-end
+devalias ext /sd/disk@1 +\ 2 is WLAN devalias int /sd/disk@3 -devalias ext /sd/disk@2 +devalias emmc /sd/disk@3 +\ Nothing on channel 4 devalias int-sd /sd/disk@5 -devalias emmc /sd/disk@5
stand-init: boot-dev-sel-gpio# gpio-pin@ 0= if
Modified: cpu/arm/olpc/sdhci.fth ============================================================================== --- cpu/arm/olpc/sdhci.fth Wed Aug 1 10:22:27 2012 (r3110) +++ cpu/arm/olpc/sdhci.fth Wed Aug 1 10:23:34 2012 (r3111) @@ -17,12 +17,22 @@ \ Slot:power_GPIO - 1:35, 2:34, 3:33 : gpio-power-on ( -- ) sdhci-card-power-on +[ifdef] en-emmc-pwr-gpio# + slot 3 = if en-emmc-pwr-gpio# gpio-clr then +[then] +[ifdef] en-wlan-pwr-gpio# slot 2 = if en-wlan-pwr-gpio# gpio-set then +[then] ; ' gpio-power-on to card-power-on
: gpio-power-off ( -- ) +[ifdef] en-emmc-pwr-gpio# + slot 3 = if en-emmc-pwr-gpio# gpio-set then +[then] +[ifdef] en-wlan-pwr-gpio# slot 2 = if en-wlan-pwr-gpio# gpio-clr then +[then] sdhci-card-power-off ; ' gpio-power-off to card-power-off
Modified: dev/mmc/sdhci/sdhci.fth ============================================================================== --- dev/mmc/sdhci/sdhci.fth Wed Aug 1 10:22:27 2012 (r3110) +++ dev/mmc/sdhci/sdhci.fth Wed Aug 1 10:23:34 2012 (r3111) @@ -760,9 +760,9 @@
\ Ideally, the width selection would be done by using CMD19 to test the bus hc-supports-8-bit? if - mmc-8-bit 8-bit + mmc-8-bit 1 ms 8-bit else - mmc-4-bit 4-bit + mmc-4-bit 1 ms 4-bit then
\ Ideally, we should set the speed class/power consumption - but the devices