Skip to content

Commit 7b4bd57

Browse files
Mengqi Zhanggregkh
authored andcommitted
mmc: core: Add HS400 tuning in HS400es initialization
commit 77e01b4 upstream. 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: Mengqi Zhang <mengqi.zhang@mediatek.com> Link: https://lore.kernel.org/r/20231225093839.22931-2-mengqi.zhang@mediatek.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Cc: "Lin Gui (桂林)" <Lin.Gui@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e628352 commit 7b4bd57

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/mmc/core/mmc.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,8 +1819,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
18191819

18201820
if (err)
18211821
goto free_card;
1822-
1823-
} else if (!mmc_card_hs400es(card)) {
1822+
} else if (mmc_card_hs400es(card)) {
1823+
if (host->ops->execute_hs400_tuning) {
1824+
err = host->ops->execute_hs400_tuning(host, card);
1825+
if (err)
1826+
goto free_card;
1827+
}
1828+
} else {
18241829
/* Select the desired bus width optionally */
18251830
err = mmc_select_bus_width(card);
18261831
if (err > 0 && mmc_card_hs(card)) {

0 commit comments

Comments
 (0)