aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/mmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r--drivers/mmc/mmc.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 2ba46273496b..f772df93a398 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1106,11 +1106,29 @@ static void mmc_process_ext_csds(struct mmc_host *host)
1106 mmc_wait_for_req(host, &mrq); 1106 mmc_wait_for_req(host, &mrq);
1107 1107
1108 if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) { 1108 if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) {
1109 printk("%s: unable to read EXT_CSD, performance " 1109 if (card->csd.capacity == (4096 * 512)) {
1110 "might suffer.\n", mmc_hostname(card->host)); 1110 printk(KERN_ERR "%s: unable to read EXT_CSD "
1111 "on a possible high capacity card. "
1112 "Card will be ignored.\n",
1113 mmc_hostname(card->host));
1114 mmc_card_set_dead(card);
1115 } else {
1116 printk(KERN_WARNING "%s: unable to read "
1117 "EXT_CSD, performance might "
1118 "suffer.\n",
1119 mmc_hostname(card->host));
1120 }
1111 continue; 1121 continue;
1112 } 1122 }
1113 1123
1124 card->ext_csd.sectors =
1125 ext_csd[EXT_CSD_SEC_CNT + 0] << 0 |
1126 ext_csd[EXT_CSD_SEC_CNT + 1] << 8 |
1127 ext_csd[EXT_CSD_SEC_CNT + 2] << 16 |
1128 ext_csd[EXT_CSD_SEC_CNT + 3] << 24;
1129 if (card->ext_csd.sectors)
1130 mmc_card_set_blockaddr(card);
1131
1114 switch (ext_csd[EXT_CSD_CARD_TYPE]) { 1132 switch (ext_csd[EXT_CSD_CARD_TYPE]) {
1115 case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26: 1133 case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26:
1116 card->ext_csd.hs_max_dtr = 52000000; 1134 card->ext_csd.hs_max_dtr = 52000000;
@@ -1499,7 +1517,8 @@ static void mmc_setup(struct mmc_host *host)
1499 mmc_send_app_op_cond(host, host->ocr | (sd2 << 30), NULL); 1517 mmc_send_app_op_cond(host, host->ocr | (sd2 << 30), NULL);
1500 } 1518 }
1501 } else { 1519 } else {
1502 mmc_send_op_cond(host, host->ocr, NULL); 1520 /* The extra bit indicates that we support high capacity */
1521 mmc_send_op_cond(host, host->ocr | (1 << 30), NULL);
1503 } 1522 }
1504 1523
1505 mmc_discover_cards(host); 1524 mmc_discover_cards(host);