Skip to content

Commit f30dc8f

Browse files
committed
Merge tag 'mmc-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fixes from Ulf Hansson: "A couple of MMC fixes to the Renesas SDHI driver: - Fix HS400 on R-Car M3-W+ - Abort tuning when timeout detected" * tag 'mmc-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+ mmc: renesas_sdhi: abort tuning when timeout detected
2 parents 06af867 + 6687cd7 commit f30dc8f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/mmc/host/renesas_sdhi_core.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,14 +692,19 @@ static int renesas_sdhi_execute_tuning(struct mmc_host *mmc, u32 opcode)
692692

693693
/* Issue CMD19 twice for each tap */
694694
for (i = 0; i < 2 * priv->tap_num; i++) {
695+
int cmd_error;
696+
695697
/* Set sampling clock position */
696698
sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET, i % priv->tap_num);
697699

698-
if (mmc_send_tuning(mmc, opcode, NULL) == 0)
700+
if (mmc_send_tuning(mmc, opcode, &cmd_error) == 0)
699701
set_bit(i, priv->taps);
700702

701703
if (sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_SMPCMP) == 0)
702704
set_bit(i, priv->smpcmp);
705+
706+
if (cmd_error)
707+
mmc_abort_tuning(mmc, opcode);
703708
}
704709

705710
ret = renesas_sdhi_select_tuning(host);
@@ -939,7 +944,7 @@ static const struct soc_device_attribute sdhi_quirks_match[] = {
939944
{ .soc_id = "r8a7795", .revision = "ES3.*", .data = &sdhi_quirks_bad_taps2367 },
940945
{ .soc_id = "r8a7796", .revision = "ES1.[012]", .data = &sdhi_quirks_4tap_nohs400 },
941946
{ .soc_id = "r8a7796", .revision = "ES1.*", .data = &sdhi_quirks_r8a7796_es13 },
942-
{ .soc_id = "r8a7796", .revision = "ES3.*", .data = &sdhi_quirks_bad_taps1357 },
947+
{ .soc_id = "r8a77961", .data = &sdhi_quirks_bad_taps1357 },
943948
{ .soc_id = "r8a77965", .data = &sdhi_quirks_r8a77965 },
944949
{ .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
945950
{ .soc_id = "r8a77990", .data = &sdhi_quirks_r8a77990 },

0 commit comments

Comments
 (0)