Hi, On 08-09-15 17:38, Yousong Zhou wrote:
I just tried a method from allwinner's u-boot sources: retry the mode switch in case of an error [1]. It was accompanied with a comment quoted below: //retry for Toshiba emmc;for the first time Toshiba emmc change to HS //it will return response crc err,so retry Well, that 1GB card of mine is labeled as "pqi" made in Korea. This workaround really worked and it succeeded on the second try, though I am not sure how anti-spec this can be (the spec says a power reset SHOULD be done in the case of crc error in the status data). The above change alone can make the card work. I also noticed that allwinner's uboot will disable the clock first before setting it and re-enable it thereafter [2]. I can only guess that this is possibly some bugfix made by engineers of allwinner. So I mimicked this approach and attached a patch here.
Thanks for this. So if I understand you correctly then just the: "mmc: retry in the case of failing to switch to HS mode" Patch is enough to make things work, right ? That makes sense because the clock dance you are subscribing is something which allwinner does in many places and it really is not necessary. Can you do a similar patch for the kernel and test that too ? And once you've a working kernel patch submit that to Ulf, with the mmc list in the Cc? If Ulf is willing to take this fix on the kernel side (I'm the sunxi-mmc maintainer in the kernel, and the fix will get my ack), then I'm willing to take the u-boot version of this fix. Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html