mmc: core: update host->card after getting RCA for SD card

During tuning the status command CMD13 needs to be sent to the
card to know the card's state upon any failure to tuning command.

Change-Id: Iaefc80305d101bd72ff22f792b1967379507a739
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Pavan Anamula <pavana@codeaurora.org>
This commit is contained in:
Pavan Anamula 2015-07-22 17:25:09 +05:30 committed by Subhash Jadavani
parent 2e35d27728
commit 772de4cace

View file

@ -1032,6 +1032,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
err = mmc_send_relative_addr(host, &card->rca);
if (err)
goto free_card;
host->card = card;
}
if (!oldcard) {
@ -1098,12 +1099,13 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
card->clk_scaling_highest = mmc_sd_get_max_clock(card);
card->clk_scaling_lowest = host->f_min;
host->card = card;
return 0;
free_card:
if (!oldcard)
if (!oldcard) {
host->card = NULL;
mmc_remove_card(card);
}
return err;
}