> If I understand correctly, there is no point in sending the CMD13 above, unless > this is the first attempt to initialize the card. > Therefore, it's better to move the whole part above, inside the below if-clause > too, otherwise we would end up sending a CMD13 in cases when it's not > needed. R1_CARD_IS_LOCKED is CMD13 response, but already in CMD7 response as well, So theoretically you want to skip mmc_sd_setup_card altogether. ACMD6, CMD6, and CMD19 should wait for CMD42 to unlock the card. Thanks, Avri > > > + > > + if (!reinit && !(card_status & R1_CARD_IS_LOCKED)) { > > /* > > * Fetch SCR from card. > > */ > > -- > > 2.34.1 > > > > Kind regards > Uffe