Author: wmb Date: 2009-10-29 00:56:45 +0100 (Thu, 29 Oct 2009) New Revision: 1444
Modified: dev/mmc/sdhci/sdhcixo.bth dev/mmc/sdhci/sdmmc.fth dev/mmc/sdhci/selftest.fth Log: OLPC trac 9546 - clarify SDMMC selftest messages for the case where no card is in the slot.
Modified: dev/mmc/sdhci/sdhcixo.bth =================================================================== --- dev/mmc/sdhci/sdhcixo.bth 2009-10-28 23:32:13 UTC (rev 1443) +++ dev/mmc/sdhci/sdhcixo.bth 2009-10-28 23:56:45 UTC (rev 1444) @@ -27,11 +27,13 @@ new-device 1 encode-int " reg" property " sdmmc" " $load-driver" eval drop + " internal" " slot-name" string-property finish-device
new-device 2 encode-int " reg" property " sdmmc" " $load-driver" eval drop + " external" " slot-name" string-property finish-device
new-device
Modified: dev/mmc/sdhci/sdmmc.fth =================================================================== --- dev/mmc/sdhci/sdmmc.fth 2009-10-28 23:32:13 UTC (rev 1443) +++ dev/mmc/sdhci/sdmmc.fth 2009-10-28 23:56:45 UTC (rev 1444) @@ -44,8 +44,9 @@ : dma-alloc ( size -- vadr ) " dma-alloc" $call-parent ; : dma-free ( vadr size -- ) " dma-free" $call-parent ;
+: set-unit ( -- ) 0 my-unit " set-address" $call-parent ; : open ( -- ) - 0 my-unit " set-address" $call-parent + set-unit " attach-card" $call-parent 0= if false exit then
" " " deblocker" $open-package ?dup if
Modified: dev/mmc/sdhci/selftest.fth =================================================================== --- dev/mmc/sdhci/selftest.fth 2009-10-28 23:32:13 UTC (rev 1443) +++ dev/mmc/sdhci/selftest.fth 2009-10-28 23:56:45 UTC (rev 1444) @@ -36,6 +36,15 @@ ; external : selftest ( -- error? ) + set-unit + " card-inserted?" $call-parent 0= if + ." No card in " + " slot-name" get-my-property 0= if + decode-string type space + then + ." SD slot" cr + true exit + then open 0= if ." Open sdmmc failed" cr true exit then alloc-test-bufs ['] (selftest) catch if true then
openfirmware@openfirmware.info