diff options
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r-- | drivers/mmc/core/mmc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 0477769a884..2a9b7b1a480 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -728,7 +728,7 @@ static int mmc_select_powerclass(struct mmc_card *card, | |||
728 | */ | 728 | */ |
729 | static int mmc_select_hs200(struct mmc_card *card) | 729 | static int mmc_select_hs200(struct mmc_card *card) |
730 | { | 730 | { |
731 | int idx, err = 0; | 731 | int idx, err = -EINVAL; |
732 | struct mmc_host *host; | 732 | struct mmc_host *host; |
733 | static unsigned ext_csd_bits[] = { | 733 | static unsigned ext_csd_bits[] = { |
734 | EXT_CSD_BUS_WIDTH_4, | 734 | EXT_CSD_BUS_WIDTH_4, |
@@ -744,10 +744,12 @@ static int mmc_select_hs200(struct mmc_card *card) | |||
744 | host = card->host; | 744 | host = card->host; |
745 | 745 | ||
746 | if (card->ext_csd.card_type & EXT_CSD_CARD_TYPE_SDR_1_2V && | 746 | if (card->ext_csd.card_type & EXT_CSD_CARD_TYPE_SDR_1_2V && |
747 | host->caps2 & MMC_CAP2_HS200_1_2V_SDR) | 747 | host->caps2 & MMC_CAP2_HS200_1_2V_SDR) |
748 | if (mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120, 0)) | 748 | err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120, 0); |
749 | err = mmc_set_signal_voltage(host, | 749 | |
750 | MMC_SIGNAL_VOLTAGE_180, 0); | 750 | if (err && card->ext_csd.card_type & EXT_CSD_CARD_TYPE_SDR_1_8V && |
751 | host->caps2 & MMC_CAP2_HS200_1_8V_SDR) | ||
752 | err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180, 0); | ||
751 | 753 | ||
752 | /* If fails try again during next card power cycle */ | 754 | /* If fails try again during next card power cycle */ |
753 | if (err) | 755 | if (err) |