• Jarkko Lavinen's avatar
    [PATCH] ARM: OMAP: CMD7 failing on ATP & Transcend MMC cards · 5fb4ec6f
    Jarkko Lavinen authored
    I see ATP and Transcend cards failing repeatedly in the card select command
    (CMD7) due to illegal instruction after CMD2.  Doing an extra status inquiry
    when leaving the card identification mode seems to fix this problem.
    This bug occured when opening the mmc cover with mounted card inside and
    closing the cover again. This will cause detection of any new cards in
    the card detection mode and ATP and Transcend cards get confused.
    
    I don't know why only ATP and Transcend have this problem and why
    doing status inquiry helps.  Status inquiry command CMD13 is neutral
    and is claimed to not chnage the card state in the MMC spec.
    The order of commands must be CMD13 first, then CMD7.  CMD13 fails
    also due to illegal instruction error after CMD2 but after this the
    card is back to its senses.
    
    If CMD7 is run first, and CMD13 once CMD7 is seen failing, this fails
    to bring the card back to its senses.  Then the CMD7 fails repeatedly
    due to command timeout before and after CMD13.
    
    The attached patch does the extra probing in mmc_setup() during
    low clock which is perhaps an overkill. One could do it also in
    mmc_rescan() after switching back to higher clock.
    5fb4ec6f
mmc.c 28.6 KB