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/lib/zlib/inflate.c b/lib/zlib/inflate.c
index 6411c47..30dfe15 100644
--- a/lib/zlib/inflate.c
+++ b/lib/zlib/inflate.c
@@ -25,7 +25,7 @@
state->hold = 0;
state->bits = 0;
state->lencode = state->distcode = state->next = state->codes;
- WATCHDOG_RESET();
+ schedule();
Tracev((stderr, "inflate: reset\n"));
return Z_OK;
}
@@ -543,7 +543,7 @@
strm->adler = state->check = adler32(0L, Z_NULL, 0);
state->mode = TYPE;
case TYPE:
- WATCHDOG_RESET();
+ schedule();
if (flush == Z_BLOCK) goto inf_leave;
case TYPEDO:
if (state->last) {
@@ -721,7 +721,7 @@
Tracev((stderr, "inflate: codes ok\n"));
state->mode = LEN;
case LEN:
- WATCHDOG_RESET();
+ schedule();
if (have >= 6 && left >= 258) {
RESTORE();
inflate_fast(strm, out);
@@ -933,7 +933,7 @@
return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
if (state->window != Z_NULL) {
- WATCHDOG_RESET();
+ schedule();
ZFREE(strm, state->window);
}
ZFREE(strm, strm->state);