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/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 9b0d16f..d3c3d3e 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -70,7 +70,7 @@
static int pl01x_tstc(struct pl01x_regs *regs)
{
- WATCHDOG_RESET();
+ schedule();
return !(readl(®s->fr) & UART_PL01x_FR_RXFE);
}
@@ -227,7 +227,7 @@
int ch = pl01x_getc(base_regs);
if (ch == -EAGAIN) {
- WATCHDOG_RESET();
+ schedule();
continue;
}
@@ -247,9 +247,9 @@
* crap in console
*/
while (!(readl(&base_regs->fr) & UART_PL01x_FR_TXFE))
- WATCHDOG_RESET();
+ schedule();
while (readl(&base_regs->fr) & UART_PL01x_FR_BUSY)
- WATCHDOG_RESET();
+ schedule();
pl01x_serial_init_baud(gd->baudrate);
}