Commit 4ed074c6 authored by Girish K S's avatar Girish K S Committed by Greg Kroah-Hartman

mmc: core: Fix voltage select in DDR mode

commit 913047e9 upstream.

This patch fixes the wrong comparison before setting the interface
voltage in DDR mode.

The assignment to the variable ddr before comaprison is either
ddr = MMC_1_2V_DDR_MODE; or ddr == MMC_1_8V_DDR_MODE. But the comparison
is done with the extended csd value if ddr == EXT_CSD_CARD_TYPE_DDR_1_2V.
Signed-off-by: default avatarGirish K S <girish.shivananjappa@linaro.org>
Acked-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
Acked-by: default avatarPhilip Rakity <prakity@marvell.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 69b97cf5
...@@ -1048,7 +1048,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -1048,7 +1048,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
* *
* WARNING: eMMC rules are NOT the same as SD DDR * WARNING: eMMC rules are NOT the same as SD DDR
*/ */
if (ddr == EXT_CSD_CARD_TYPE_DDR_1_2V) { if (ddr == MMC_1_2V_DDR_MODE) {
err = mmc_set_signal_voltage(host, err = mmc_set_signal_voltage(host,
MMC_SIGNAL_VOLTAGE_120, 0); MMC_SIGNAL_VOLTAGE_120, 0);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment