diff options
Diffstat (limited to 'drivers/mmc/mmc.c')
| -rw-r--r-- | drivers/mmc/mmc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index d336a1d65dc7..eb41391e06e9 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
| @@ -679,7 +679,15 @@ static void mmc_idle_cards(struct mmc_host *host) | |||
| 679 | } | 679 | } |
| 680 | 680 | ||
| 681 | /* | 681 | /* |
| 682 | * Apply power to the MMC stack. | 682 | * Apply power to the MMC stack. This is a two-stage process. |
| 683 | * First, we enable power to the card without the clock running. | ||
| 684 | * We then wait a bit for the power to stabilise. Finally, | ||
| 685 | * enable the bus drivers and clock to the card. | ||
| 686 | * | ||
| 687 | * We must _NOT_ enable the clock prior to power stablising. | ||
| 688 | * | ||
| 689 | * If a host does all the power sequencing itself, ignore the | ||
| 690 | * initial MMC_POWER_UP stage. | ||
| 683 | */ | 691 | */ |
| 684 | static void mmc_power_up(struct mmc_host *host) | 692 | static void mmc_power_up(struct mmc_host *host) |
| 685 | { | 693 | { |
| @@ -932,8 +940,9 @@ static void mmc_read_scrs(struct mmc_host *host) | |||
| 932 | 940 | ||
| 933 | sg_init_one(&sg, (u8*)card->raw_scr, 8); | 941 | sg_init_one(&sg, (u8*)card->raw_scr, 8); |
| 934 | 942 | ||
| 935 | err = mmc_wait_for_req(host, &mrq); | 943 | mmc_wait_for_req(host, &mrq); |
| 936 | if (err != MMC_ERR_NONE) { | 944 | |
| 945 | if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) { | ||
| 937 | mmc_card_set_dead(card); | 946 | mmc_card_set_dead(card); |
| 938 | continue; | 947 | continue; |
| 939 | } | 948 | } |
