aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorStefan Roese2022-09-02 14:10:46 +0200
committerStefan Roese2022-09-18 10:26:33 +0200
commit29caf9305b6fafe8f6d6b18fa1f825dff8686e61 (patch)
tree6530f6a2373b7af6fb4fdceca823b21f7c79ed7f /drivers/mmc
parent881d4108257a45ac890ef27c523783dbe401e462 (diff)
cyclic: Use schedule() instead of WATCHDOG_RESET()
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/octeontx_hsmmc.c12
-rw-r--r--drivers/mmc/sh_mmcif.c6
-rw-r--r--drivers/mmc/stm32_sdmmc2.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mmc/octeontx_hsmmc.c b/drivers/mmc/octeontx_hsmmc.c
index 6e9acf7310a..4ee62df9d40 100644
--- a/drivers/mmc/octeontx_hsmmc.c
+++ b/drivers/mmc/octeontx_hsmmc.c
@@ -1023,7 +1023,7 @@ static void octeontx_mmc_cleanup_dma(struct mmc *mmc,
start = get_timer(0);
do {
rsp_sts.u = read_csr(mmc, MIO_EMM_RSP_STS());
- WATCHDOG_RESET();
+ schedule();
} while (get_timer(start) < 100 &&
(rsp_sts.s.dma_val || rsp_sts.s.dma_pend));
} while (retries-- >= 0 && rsp_sts.s.dma_pend);
@@ -1107,7 +1107,7 @@ static int octeontx_mmc_wait_dma(struct mmc *mmc, bool write, ulong timeout,
} else if (!rsp_sts.s.dma_val && emm_dma_int.s.done) {
break;
}
- WATCHDOG_RESET();
+ schedule();
timed_out = (get_timer(start_time) > timeout);
} while (!timed_out);
@@ -1219,7 +1219,7 @@ static int octeontx_mmc_read_blocks(struct mmc *mmc, struct mmc_cmd *cmd,
}
return blkcnt - count;
}
- WATCHDOG_RESET();
+ schedule();
} while (--count);
}
#ifdef DEBUG
@@ -1253,7 +1253,7 @@ static int octeontx_mmc_poll_ready(struct mmc *mmc, ulong timeout)
} else if (cmd.response[0] & R1_READY_FOR_DATA) {
return 0;
}
- WATCHDOG_RESET();
+ schedule();
} while (get_timer(start) < timeout);
if (not_ready)
@@ -1328,7 +1328,7 @@ static ulong octeontx_mmc_write_blocks(struct mmc *mmc, struct mmc_cmd *cmd,
read_csr(mmc, MIO_EMM_DMA()));
return blkcnt - count;
}
- WATCHDOG_RESET();
+ schedule();
} while (--count);
}
@@ -1491,7 +1491,7 @@ static int octeontx_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
start = get_timer(0);
do {
rsp_sts.u = read_csr(mmc, MIO_EMM_RSP_STS());
- WATCHDOG_RESET();
+ schedule();
} while (!rsp_sts.s.cmd_done && !rsp_sts.s.rsp_timeout &&
(get_timer(start) < timeout + 10));
octeontx_mmc_print_rsp_errors(mmc, rsp_sts);
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index 830e29cdd41..76dc1c68b82 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -242,7 +242,7 @@ static int sh_mmcif_multi_read(struct sh_mmcif_host *host,
for (i = 0; i < blocksize / 4; i++)
*p++ = sh_mmcif_read(&host->regs->ce_data);
- WATCHDOG_RESET();
+ schedule();
}
return 0;
}
@@ -309,7 +309,7 @@ static int sh_mmcif_multi_write(struct sh_mmcif_host *host,
for (i = 0; i < blocksize / 4; i++)
sh_mmcif_write(*p++, &host->regs->ce_data);
- WATCHDOG_RESET();
+ schedule();
}
return 0;
}
@@ -523,7 +523,7 @@ static int sh_mmcif_send_cmd_common(struct sh_mmcif_host *host,
{
int ret;
- WATCHDOG_RESET();
+ schedule();
switch (cmd->cmdidx) {
case MMC_CMD_APP_CMD:
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index bfce8a2e4a6..7ab4d949e74 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -445,7 +445,7 @@ 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();
+ schedule();
retry_cmd:
ctx.data_length = 0;