diff options
author | Mengqi Zhang <mengqi.zhang@mediatek.com> | 2023-12-25 12:38:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-25 17:21:30 +0300 |
commit | 493a8172e548ad2fe3f79808ebea93fbe05ac5da (patch) | |
tree | 3534abed5bfc705d3d310602b6a6fb42806f9687 /drivers/mmc | |
parent | 5d91238b590bd883c86ba7707c5c9096469c08b7 (diff) | |
download | linux-493a8172e548ad2fe3f79808ebea93fbe05ac5da.tar.xz |
mmc: core: Add HS400 tuning in HS400es initialization
commit 77e01b49e35f24ebd1659096d5fc5c3b75975545 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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/mmc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 3a927452a650..7e39017e440f 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1819,8 +1819,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, if (err) 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 */ err = mmc_select_bus_width(card); if (err > 0 && mmc_card_hs(card)) { |