diff options
-rw-r--r-- | drivers/mmc/core/core.c | 8 | ||||
-rw-r--r-- | drivers/mmc/core/mmc.c | 8 | ||||
-rw-r--r-- | drivers/mmc/core/sd.c | 2 | ||||
-rw-r--r-- | drivers/mmc/core/sdio.c | 2 |
4 files changed, 11 insertions, 9 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 5ae6b159dbea..45ea968e7dd1 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -1160,13 +1160,11 @@ static void mmc_power_up(struct mmc_host *host) | |||
1160 | bit = fls(host->ocr_avail) - 1; | 1160 | bit = fls(host->ocr_avail) - 1; |
1161 | 1161 | ||
1162 | host->ios.vdd = bit; | 1162 | host->ios.vdd = bit; |
1163 | if (mmc_host_is_spi(host)) { | 1163 | if (mmc_host_is_spi(host)) |
1164 | host->ios.chip_select = MMC_CS_HIGH; | 1164 | host->ios.chip_select = MMC_CS_HIGH; |
1165 | host->ios.bus_mode = MMC_BUSMODE_PUSHPULL; | 1165 | else |
1166 | } else { | ||
1167 | host->ios.chip_select = MMC_CS_DONTCARE; | 1166 | host->ios.chip_select = MMC_CS_DONTCARE; |
1168 | host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; | 1167 | host->ios.bus_mode = MMC_BUSMODE_PUSHPULL; |
1169 | } | ||
1170 | host->ios.power_mode = MMC_POWER_UP; | 1168 | host->ios.power_mode = MMC_POWER_UP; |
1171 | host->ios.bus_width = MMC_BUS_WIDTH_1; | 1169 | host->ios.bus_width = MMC_BUS_WIDTH_1; |
1172 | host->ios.timing = MMC_TIMING_LEGACY; | 1170 | host->ios.timing = MMC_TIMING_LEGACY; |
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 3b7c069a4ea6..b74e6f14b3ac 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -548,6 +548,10 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, | |||
548 | BUG_ON(!host); | 548 | BUG_ON(!host); |
549 | WARN_ON(!host->claimed); | 549 | WARN_ON(!host->claimed); |
550 | 550 | ||
551 | /* Set correct bus mode for MMC before attempting init */ | ||
552 | if (!mmc_host_is_spi(host)) | ||
553 | mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN); | ||
554 | |||
551 | /* | 555 | /* |
552 | * Since we're changing the OCR value, we seem to | 556 | * Since we're changing the OCR value, we seem to |
553 | * need to tell some cards to go back to the idle | 557 | * need to tell some cards to go back to the idle |
@@ -1022,6 +1026,10 @@ int mmc_attach_mmc(struct mmc_host *host) | |||
1022 | BUG_ON(!host); | 1026 | BUG_ON(!host); |
1023 | WARN_ON(!host->claimed); | 1027 | WARN_ON(!host->claimed); |
1024 | 1028 | ||
1029 | /* Set correct bus mode for MMC before attempting attach */ | ||
1030 | if (!mmc_host_is_spi(host)) | ||
1031 | mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN); | ||
1032 | |||
1025 | err = mmc_send_op_cond(host, 0, &ocr); | 1033 | err = mmc_send_op_cond(host, 0, &ocr); |
1026 | if (err) | 1034 | if (err) |
1027 | return err; | 1035 | return err; |
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 4c281a4bf058..342b18c4afcb 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
@@ -929,8 +929,6 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, | |||
929 | err = mmc_send_relative_addr(host, &card->rca); | 929 | err = mmc_send_relative_addr(host, &card->rca); |
930 | if (err) | 930 | if (err) |
931 | return err; | 931 | return err; |
932 | |||
933 | mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL); | ||
934 | } | 932 | } |
935 | 933 | ||
936 | if (!oldcard) { | 934 | if (!oldcard) { |
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index ac492ac974e1..698d813cff3b 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c | |||
@@ -408,8 +408,6 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, | |||
408 | */ | 408 | */ |
409 | if (oldcard) | 409 | if (oldcard) |
410 | oldcard->rca = card->rca; | 410 | oldcard->rca = card->rca; |
411 | |||
412 | mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL); | ||
413 | } | 411 | } |
414 | 412 | ||
415 | /* | 413 | /* |