Author: wmb Date: Mon Feb 14 08:15:27 2011 New Revision: 2174 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2174
Log: SDHCI - The SD switch-function command - CMD6 - is response type R1, not R1b (as opposed to the MMC SWITCH command - also CMD6 - which is R1b). The SDHCI spec isn't clear what happens when you (erroneously) specify a command with both data transfer and busy. On the first two SDHCI implementations we have seen, the data transfer overrides the busy, but the Marvell MMP2 SDHCI returns two Transfer Complete interrupts - one for the spurious "not busy", and one for the transfer complete. The spurious "not busy" interrupt confused the driver in thinking that the data was ready, when it was not. The fix is to issue the correct command form (R1 without busy) for SD CMD6.
Modified: dev/mmc/sdhci/sdhci.fth
Modified: dev/mmc/sdhci/sdhci.fth ============================================================================== --- dev/mmc/sdhci/sdhci.fth Mon Feb 7 08:36:03 2011 (r2173) +++ dev/mmc/sdhci/sdhci.fth Mon Feb 14 08:15:27 2011 (r2174) @@ -431,7 +431,7 @@ \ CMD6 (R1) is switch-function. It can be used to enter high-speed mode : switch-function ( arg -- adr ) scratch-buf d# 64 d# 64 (dma-setup) - h# 063b h# 11 cmd ( response drop ) + h# 063a h# 11 cmd ( response drop ) 2 wait dma-release scratch-buf