Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288179
b: refs/heads/master
c: e774747
h: refs/heads/master
i:
  288177: 993930f
  288175: 2797a2b
v: v3
  • Loading branch information
Ulf Hansson authored and Chris Ball committed Mar 4, 2012
1 parent aca1b1d commit 6aa0663
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f7f6b7e46117edb83d12a508fffa0f013457677
refs/heads/master: e7747475b61fdc2a4a412475a9d64d8c309916e3
3 changes: 3 additions & 0 deletions trunk/drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2068,6 +2068,9 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
*/
mmc_hw_reset_for_init(host);

/* Initialization should be done at 3.3 V I/O voltage. */
mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);

/*
* sdio_reset sends CMD52 to reset card. Since we do not know
* if the card is being re-initialized, just send it. CMD52
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,9 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
if (!mmc_host_is_spi(host))
mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN);

/* Initialization should be done at 3.3 V I/O voltage. */
mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);

/*
* Since we're changing the OCR value, we seem to
* need to tell some cards to go back to the idle
Expand Down
8 changes: 3 additions & 5 deletions trunk/drivers/mmc/core/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,9 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
BUG_ON(!host);
WARN_ON(!host->claimed);

/* The initialization should be done at 3.3 V I/O voltage. */
mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);

err = mmc_sd_get_cid(host, ocr, cid, &rocr);
if (err)
return err;
Expand Down Expand Up @@ -1156,11 +1159,6 @@ int mmc_attach_sd(struct mmc_host *host)
BUG_ON(!host);
WARN_ON(!host->claimed);

/* Make sure we are at 3.3V signalling voltage */
err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, false);
if (err)
return err;

/* Disable preset value enable if already set since last time */
if (host->ops->enable_preset_value) {
mmc_host_clk_hold(host);
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/mmc/core/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
* Inform the card of the voltage
*/
if (!powered_resume) {
/* The initialization should be done at 3.3 V I/O voltage. */
mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);

err = mmc_send_io_op_cond(host, host->ocr, &ocr);
if (err)
goto err;
Expand Down Expand Up @@ -996,6 +999,11 @@ static int mmc_sdio_power_restore(struct mmc_host *host)
* With these steps taken, mmc_select_voltage() is also required to
* restore the correct voltage setting of the card.
*/

/* The initialization should be done at 3.3 V I/O voltage. */
if (!mmc_card_keep_power(host))
mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);

sdio_reset(host);
mmc_go_idle(host);
mmc_send_if_cond(host, host->ocr_avail);
Expand Down

0 comments on commit 6aa0663

Please sign in to comment.