Skip to content

Commit ff31ee0

Browse files
Yann-lmsUlf Hansson
authored andcommitted
mmc: mmci: stm32: clear DLYB_CR after sending tuning command
During test campaign, and especially after several unbind/bind sequences, it has been seen that the SD-card on SDMMC1 thread could freeze. The freeze always appear on a CMD23 following a CMD19. Checking SDMMC internal registers shows that the tuning command (CMD19) has failed. The freeze is then due to the delay block involved in the tuning sequence. To correct this, clear the delay block register DLYB_CR register after the tuning commands. Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com> Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Fixes: 1103f80 ("mmc: mmci_sdmmc: Add execute tuning with delay block") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20211215141727.4901-4-yann.gautier@foss.st.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent f89b548 commit ff31ee0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/mmc/host/mmci_stm32_sdmmc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,8 @@ static int sdmmc_dlyb_phase_tuning(struct mmci_host *host, u32 opcode)
441441
return -EINVAL;
442442
}
443443

444+
writel_relaxed(0, dlyb->base + DLYB_CR);
445+
444446
phase = end_of_len - max_len / 2;
445447
sdmmc_dlyb_set_cfgr(dlyb, dlyb->unit, phase, false);
446448

0 commit comments

Comments
 (0)