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

Commit a455049e authored by Bao D. Nguyen's avatar Bao D. Nguyen
Browse files

mmc: core: Fix uninitialized clock scaling's freq table



For the UHS1 cards that have been initialized to operate
at 1.8V signaling level earlier and the card initialization
is invoked again, the driver would skip the voltage switching
sequence from 3.3V to 1.8V and exit the card initialization
because the SD card is already operating at 1.8V signaling voltage.
The clock scaling logic's clk_scaling_highest and clk_scaling_lowest
would be un-initialized in this case and cause failure to the
subsequent clock scaling initialization. Fix the issue by properly
initialize the clock scaling parameters that are later used by
the clock scaling initialization function.

Change-Id: I6489fbe3790feb07613d27b3c4bef62cd34fd44b
Signed-off-by: default avatarBao D. Nguyen <nguyenb@codeaurora.org>
parent a9974f00
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1164,12 +1164,11 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
		err = -EINVAL;
		goto free_card;
	}

done:
#if defined(CONFIG_SDC_QTI)
	card->clk_scaling_highest = mmc_sd_get_max_clock(card);
	card->clk_scaling_lowest = host->f_min;
#endif
done:
	host->card = card;
	return 0;