mmc: core: Add workaround for hosts that need addtional tuning for HS400
Add a capability to identify hosts that need additional tuning for HS400 and perform a post tuning process that maybe needed for proper HS400 functionality. Change-Id: I3895aabddce4dbecb208e3c522957e656f37e30d Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org> [subhashj@codeaurora.org: fixed trivial merge conflicts] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
parent
34e4cf13f7
commit
58821ee5f6
2 changed files with 13 additions and 0 deletions
|
@ -1139,6 +1139,17 @@ static int mmc_select_hs400(struct mmc_card *card)
|
|||
goto out_err;
|
||||
}
|
||||
|
||||
if ((host->caps2 & MMC_CAP2_HS400_POST_TUNING) && host->ops->execute_tuning) {
|
||||
mmc_host_clk_hold(host);
|
||||
err = host->ops->execute_tuning(host,
|
||||
MMC_SEND_TUNING_BLOCK_HS200);
|
||||
mmc_host_clk_release(host);
|
||||
|
||||
if (err)
|
||||
pr_warn("%s: tuning execution failed\n",
|
||||
mmc_hostname(host));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
out_err:
|
||||
|
|
|
@ -318,6 +318,8 @@ struct mmc_host {
|
|||
#define MMC_CAP2_CLK_SCALE (1 << 20) /* Allow dynamic clk scaling */
|
||||
/* Allows Asynchronous SDIO irq while card is in 4-bit mode */
|
||||
#define MMC_CAP2_ASYNC_SDIO_IRQ_4BIT_MODE (1 << 21)
|
||||
/* Some hosts need additional tuning */
|
||||
#define MMC_CAP2_HS400_POST_TUNING (1 << 22)
|
||||
#define MMC_CAP2_NONHOTPLUG (1 << 25) /*Don't support hotplug*/
|
||||
|
||||
mmc_pm_flag_t pm_caps; /* supported pm features */
|
||||
|
|
Loading…
Add table
Reference in a new issue