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]
diff --git a/drivers/mmc/octeontx_hsmmc.c b/drivers/mmc/octeontx_hsmmc.c
index 6e9acf7..4ee62df 100644
--- a/drivers/mmc/octeontx_hsmmc.c
+++ b/drivers/mmc/octeontx_hsmmc.c
@@ -1023,7 +1023,7 @@
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 @@
} 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 @@
}
return blkcnt - count;
}
- WATCHDOG_RESET();
+ schedule();
} while (--count);
}
#ifdef DEBUG
@@ -1253,7 +1253,7 @@
} 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 @@
read_csr(mmc, MIO_EMM_DMA()));
return blkcnt - count;
}
- WATCHDOG_RESET();
+ schedule();
} while (--count);
}
@@ -1491,7 +1491,7 @@
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 830e29c..76dc1c6 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -242,7 +242,7 @@
for (i = 0; i < blocksize / 4; i++)
*p++ = sh_mmcif_read(&host->regs->ce_data);
- WATCHDOG_RESET();
+ schedule();
}
return 0;
}
@@ -309,7 +309,7 @@
for (i = 0; i < blocksize / 4; i++)
sh_mmcif_write(*p++, &host->regs->ce_data);
- WATCHDOG_RESET();
+ schedule();
}
return 0;
}
@@ -523,7 +523,7 @@
{
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 bfce8a2..7ab4d94 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -445,7 +445,7 @@
u32 cmdat = data ? SDMMC_CMD_CMDTRANS : 0;
int ret, retry = 3;
- WATCHDOG_RESET();
+ schedule();
retry_cmd:
ctx.data_length = 0;