Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1295acc authored by Pavan Anamula's avatar Pavan Anamula Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarSahitya Tummala <stummala@codeaurora.org>
Signed-off-by: default avatarPavan Anamula <pavana@codeaurora.org>
parent 2344e053
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1034,6 +1034,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) {
@@ -1100,12 +1101,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;
}