Commit 77e01b49 authored by Mengqi Zhang's avatar Mengqi Zhang Committed by Ulf Hansson

mmc: core: Add HS400 tuning in HS400es initialization

During the initialization to HS400es stage, add a HS400 tuning flow as an
optional process. For Mediatek IP, the HS400es mode requires a specific
tuning to ensure the correct HS400 timing setting.
Signed-off-by: default avatarMengqi Zhang <mengqi.zhang@mediatek.com>
Link: https://lore.kernel.org/r/20231225093839.22931-2-mengqi.zhang@mediatek.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 09f164d3
...@@ -1831,8 +1831,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -1831,8 +1831,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
if (err) if (err)
goto free_card; goto free_card;
} else if (mmc_card_hs400es(card)) {
} else if (!mmc_card_hs400es(card)) { if (host->ops->execute_hs400_tuning) {
err = host->ops->execute_hs400_tuning(host, card);
if (err)
goto free_card;
}
} else {
/* Select the desired bus width optionally */ /* Select the desired bus width optionally */
err = mmc_select_bus_width(card); err = mmc_select_bus_width(card);
if (err > 0 && mmc_card_hs(card)) { if (err > 0 && mmc_card_hs(card)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment