@@ -362,11 +362,13 @@ static int mmc_sdio_init_card(struct mmc
goto err;
}
- err = mmc_sd_get_cid(host, host->ocr & ocr, card->raw_cid);
-
- if (!err) {
+ if (ocr & R4_MEMORY_PRESENT) {
card->type = MMC_TYPE_SD_COMBO;
+ err = mmc_sd_get_cid(host, host->ocr & ocr, card->raw_cid);
+ if (err)
+ goto remove;
+
if (oldcard && (oldcard->type != MMC_TYPE_SD_COMBO ||
memcmp(card->raw_cid, oldcard->raw_cid, sizeof(card->raw_cid)) != 0)) {
mmc_remove_card(card);
@@ -38,6 +38,8 @@
* [8:0] Byte/block count
*/
+#define R4_MEMORY_PRESENT (1 << 27)
+
/*
SDIO status in R5
Type