From 48ac723a6fe4c31353371ec97b666b57eff65b51 Mon Sep 17 00:00:00 2001 From: Christophe Kerello Date: Tue, 30 Jul 2019 19:16:45 +0200 Subject: [PATCH] mmc: stm32_sdmmc2: reload watchdog This patch solves a watchdog reset issue during mmc erase command. Signed-off-by: Christophe Kerello Signed-off-by: Patrick Delaunay --- drivers/mmc/stm32_sdmmc2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c index 0ade1b160e..32434a4762 100644 --- a/drivers/mmc/stm32_sdmmc2.c +++ b/drivers/mmc/stm32_sdmmc2.c @@ -14,6 +14,7 @@ #include #include #include +#include struct stm32_sdmmc2_plat { struct mmc_config cfg; @@ -432,6 +433,8 @@ static int stm32_sdmmc2_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, u32 cmdat = data ? SDMMC_CMD_CMDTRANS : 0; int ret, retry = 3; + WATCHDOG_RESET(); + retry_cmd: ctx.data_length = 0; ctx.dpsm_abort = false; -- 2.39.5