Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions subsys/sd/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,6 @@ int mmc_card_init(struct sd_card *card)
return -EINVAL;
}

/* Probe to see if card is an MMC card */
ret = mmc_send_op_cond(card, ocr_arg);
if (ret) {
return ret;
}
/* Card is MMC card if no error
* (Only MMC protocol supports CMD1)
*/
card->type = CARD_MMC;

/* Set OCR Arguments */
if (card->host_props.host_caps.vol_180_support) {
ocr_arg |= MMC_OCR_VDD170_195FLAG;
Expand All @@ -137,7 +127,7 @@ int mmc_card_init(struct sd_card *card)
/* CMD1 */
ret = mmc_send_op_cond(card, ocr_arg);
if (ret) {
LOG_ERR("Failed to query card OCR");
LOG_DBG("Failed to query card OCR");
return ret;
}

Expand Down Expand Up @@ -221,9 +211,11 @@ static int mmc_send_op_cond(struct sd_card *card, int ocr)
/* OCR failed */
return ret;
}
if (ocr == 0) {
/* Just probing */
return 0;
if (retries == 0) {
/* Card is MMC card if no error
* (Only MMC protocol supports CMD1)
*/
card->type = CARD_MMC;
}
sd_delay(10);
}
Expand Down
Loading