Skip to content

Commit 77e01b4

Browse files
Mengqi Zhangstorulf
Mengqi Zhang
authored andcommitted
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: Mengqi Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 09f164d commit 77e01b4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/mmc/core/mmc.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -1831,8 +1831,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
18311831

18321832
if (err)
18331833
goto free_card;
1834-
1835-
} else if (!mmc_card_hs400es(card)) {
1834+
} else if (mmc_card_hs400es(card)) {
1835+
if (host->ops->execute_hs400_tuning) {
1836+
err = host->ops->execute_hs400_tuning(host, card);
1837+
if (err)
1838+
goto free_card;
1839+
}
1840+
} else {
18361841
/* Select the desired bus width optionally */
18371842
err = mmc_select_bus_width(card);
18381843
if (err > 0 && mmc_card_hs(card)) {

0 commit comments

Comments
 (0)