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/arch/arm/mach-at91/phy.c b/arch/arm/mach-at91/phy.c
index 6101eee..f4484a7 100644
--- a/arch/arm/mach-at91/phy.c
+++ b/arch/arm/mach-at91/phy.c
@@ -42,7 +42,7 @@
 	/* Wait for end of hardware reset */
 	while (!(readl(&rstc->sr) & AT91_RSTC_SR_NRSTL)) {
 		/* avoid shutdown by watchdog */
-		WATCHDOG_RESET();
+		schedule();
 		mdelay(10);
 
 		/* timeout for not getting stuck in an endless loop */
diff --git a/arch/arm/mach-imx/i2c-mxv7.c b/arch/arm/mach-imx/i2c-mxv7.c
index d36347d..85d648b 100644
--- a/arch/arm/mach-imx/i2c-mxv7.c
+++ b/arch/arm/mach-imx/i2c-mxv7.c
@@ -46,7 +46,7 @@
 		scl = gpio_get_value(p->scl.gp);
 		if ((sda & scl) == 1)
 			break;
-		WATCHDOG_RESET();
+		schedule();
 		elapsed = get_timer(start_time);
 		if (elapsed > (CONFIG_SYS_HZ / 5)) {	/* .2 seconds */
 			ret = -EBUSY;
diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
index ec67a5b..2c567ed 100644
--- a/arch/arm/mach-socfpga/spl_a10.c
+++ b/arch/arm/mach-socfpga/spl_a10.c
@@ -117,7 +117,7 @@
 
 	/* enable console uart printing */
 	preloader_console_init();
-	WATCHDOG_RESET();
+	schedule();
 
 	arch_early_init_r();
 
@@ -203,7 +203,7 @@
 			 */
 			set_regular_boot(true);
 
-			WATCHDOG_RESET();
+			schedule();
 
 			reset_cpu();
 		}
@@ -268,11 +268,11 @@
 
 	/* reconfigure and enable the watchdog */
 	hw_watchdog_init();
-	WATCHDOG_RESET();
+	schedule();
 #endif /* CONFIG_HW_WATCHDOG */
 
 	config_dedicated_pins(gd->fdt_blob);
-	WATCHDOG_RESET();
+	schedule();
 }
 
 /* board specific function prior loading SSBL / U-Boot proper */
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
index 2932eae..1a69bc3 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
@@ -247,7 +247,7 @@
 		err = ops->getc(down_serial_dev);
 		if (err == -EAGAIN) {
 			ctrlc();
-			WATCHDOG_RESET();
+			schedule();
 		}
 	} while ((err == -EAGAIN) && (!had_ctrlc()));
 
@@ -276,7 +276,7 @@
 			*count -= 1;
 		} else if (err == -EAGAIN) {
 			ctrlc();
-			WATCHDOG_RESET();
+			schedule();
 			if (get_timer(start) > TIMEOUT_SERIAL_BUFFER) {
 				err = -ETIMEDOUT;
 				break;
@@ -852,7 +852,7 @@
 			stm32prog_serial_result(ACK_BYTE);
 			cmd_func[counter](data);
 		}
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	/* clean device */
diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
index ebb2ac5..cd7437b 100644
--- a/arch/m68k/lib/time.c
+++ b/arch/m68k/lib/time.c
@@ -72,7 +72,7 @@
 
 		#if defined(CONFIG_WATCHDOG) || defined (CONFIG_HW_WATCHDOG)
 		if (CONFIG_SYS_WATCHDOG_FREQ && (timestamp % (CONFIG_SYS_WATCHDOG_FREQ)) == 0) {
-			WATCHDOG_RESET ();
+			schedule();
 		}
 		#endif    /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */
 		return;
diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c
index c8d06b0..86b08a6 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c
@@ -31,7 +31,7 @@
 	out_be32(&immr->im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR & ~SYPCR_SWE);
 #endif
 
-	WATCHDOG_RESET();
+	schedule();
 
 	/* SIUMCR - contains debug pin configuration (11-6) */
 	setbits_be32(&immr->im_siu_conf.sc_siumcr, CONFIG_SYS_SIUMCR);
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index e52aa75..b92df95 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -84,7 +84,7 @@
 		 *   r9: 0
 		 */
 		debug("   Booting using OF flat tree...\n");
-		WATCHDOG_RESET ();
+		schedule();
 		(*kernel) ((struct bd_info *)of_flat_tree, 0, 0, EPAPR_MAGIC,
 			   env_get_bootm_mapsize(), 0, 0);
 		/* does not return */
@@ -108,7 +108,7 @@
 		struct bd_info *kbd = images->kbd;
 
 		debug("   Booting using board info...\n");
-		WATCHDOG_RESET ();
+		schedule();
 		(*kernel) (kbd, initrd_start, initrd_end,
 			   cmd_start, cmd_end, 0, 0);
 		/* does not return */
@@ -319,7 +319,7 @@
 	 *	r9: 0
 	 *	TCR: WRC = 0, no watchdog timer reset will occur
 	 */
-	WATCHDOG_RESET();
+	schedule();
 
 	((void (*)(void *, ulong, ulong, ulong,
 		ulong, ulong, ulong))images->ep)(images->ft_addr,
diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c
index 1916251..c4c5c2d 100644
--- a/arch/powerpc/lib/cache.c
+++ b/arch/powerpc/lib/cache.c
@@ -13,7 +13,7 @@
 {
 	flushed += CONFIG_SYS_CACHELINE_SIZE;
 	if (flushed >= CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD) {
-		WATCHDOG_RESET();
+		schedule();
 		flushed = 0;
 	}
 	return flushed;
diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
index 5ba4cd0..bdb8030 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -81,7 +81,7 @@
 
 #if defined(CONFIG_WATCHDOG) || defined (CONFIG_HW_WATCHDOG)
 	if (CONFIG_SYS_WATCHDOG_FREQ && (timestamp % (CONFIG_SYS_WATCHDOG_FREQ)) == 0)
-		WATCHDOG_RESET ();
+		schedule();
 #endif    /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */
 
 #ifdef CONFIG_LED_STATUS
diff --git a/board/astro/mcf5373l/fpga.c b/board/astro/mcf5373l/fpga.c
index 50a3830..f857374 100644
--- a/board/astro/mcf5373l/fpga.c
+++ b/board/astro/mcf5373l/fpga.c
@@ -123,7 +123,7 @@
 
 		if (bytecount % len_40 == 0) {
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
-			WATCHDOG_RESET();
+			schedule();
 #endif
 #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
 			putc('.');	/* let them know we are alive */
@@ -343,7 +343,7 @@
 		}
 		if (bytecount % len_40 == 0) {
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
-			WATCHDOG_RESET();
+			schedule();
 #endif
 #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
 			putc('.');	/* let them know we are alive */
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index e3c7ed1..7e4f3ff 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -423,7 +423,7 @@
 		for (i = 0; i < 2 * nb_blink; i++) {
 			led_set_state(led, LEDST_TOGGLE);
 			mdelay(125);
-			WATCHDOG_RESET();
+			schedule();
 		}
 	}
 #endif
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index 5c1af1a..4219d00 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -329,7 +329,7 @@
 	/* Initialize and reset WDT in SPL */
 #ifdef CONFIG_SPL_WATCHDOG
 	hw_watchdog_init();
-	WATCHDOG_RESET();
+	schedule();
 #endif
 
 	/* load/boot image from boot device */
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index 460d248..9548c3c 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -722,7 +722,7 @@
 {
 	keybuf_head %= KEYBUF_SIZE;
 	while (!rx51_kp_tstc(dev))
-		WATCHDOG_RESET();
+		schedule();
 	return keybuf[keybuf_head++];
 }
 
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 9496890..6028a0b 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -289,7 +289,7 @@
 			for (i = 0; i < 2 * nb_blink; i++) {
 				led_set_state(led, LEDST_TOGGLE);
 				mdelay(125);
-				WATCHDOG_RESET();
+				schedule();
 			}
 			led_set_state(led, LEDST_ON);
 		}
diff --git a/boot/bootretry.c b/boot/bootretry.c
index 2bc9c68..8d850df 100644
--- a/boot/bootretry.c
+++ b/boot/bootretry.c
@@ -44,7 +44,7 @@
 	while (!tstc()) {	/* while no incoming data */
 		if (retry_time >= 0 && get_ticks() > endtime)
 			return -ETIMEDOUT;
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	return 0;
diff --git a/boot/image-board.c b/boot/image-board.c
index 1be0a35..98f903f 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -181,7 +181,7 @@
 		while (len > 0) {
 			size_t tail = (len > chunksz) ? chunksz : len;
 
-			WATCHDOG_RESET();
+			schedule();
 			if (to > from) {
 				to -= tail;
 				from -= tail;
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index 033a2c9..dd223b1 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -76,7 +76,7 @@
 			break;
 		if (ctrlc())
 			break;
-		WATCHDOG_RESET();
+		schedule();
 		usb_gadget_handle_interrupts(controller_index);
 	}
 
diff --git a/cmd/mem.c b/cmd/mem.c
index 6a7b401..1e39348 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -300,7 +300,7 @@
 
 		/* reset watchdog from time to time */
 		if ((ngood % (64 << 10)) == 0)
-			WATCHDOG_RESET();
+			schedule();
 	}
 	unmap_sysmem(buf1);
 	unmap_sysmem(buf2);
@@ -848,7 +848,7 @@
 		}
 	}
 	addr[test_offset] = pattern;
-	WATCHDOG_RESET();
+	schedule();
 
 	/*
 	 * Check for addr bits stuck low or shorted.
@@ -890,7 +890,7 @@
 	 * Fill memory with a known pattern.
 	 */
 	for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
-		WATCHDOG_RESET();
+		schedule();
 		addr[offset] = pattern;
 	}
 
@@ -898,7 +898,7 @@
 	 * Check each location and invert it for the second pass.
 	 */
 	for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
-		WATCHDOG_RESET();
+		schedule();
 		temp = addr[offset];
 		if (temp != pattern) {
 			printf("\nFAILURE (read/write) @ 0x%.8lx:"
@@ -918,7 +918,7 @@
 	 * Check each location for the inverted pattern and zero it.
 	 */
 	for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
-		WATCHDOG_RESET();
+		schedule();
 		anti_pattern = ~pattern;
 		temp = addr[offset];
 		if (temp != anti_pattern) {
@@ -972,7 +972,7 @@
 	for (k = 0; k < max; k++) {
 		q = 0x00000001L << k;
 		for (j = 0; j < 8; j++) {
-			WATCHDOG_RESET();
+			schedule();
 			q = ~q;
 			p1 = (volatile unsigned long *)bufa;
 			p2 = (volatile unsigned long *)bufb;
@@ -1033,7 +1033,7 @@
 		pattern, "");
 
 	for (addr = buf, val = pattern; addr < end; addr++) {
-		WATCHDOG_RESET();
+		schedule();
 		*addr = val;
 		val += incr;
 	}
@@ -1041,7 +1041,7 @@
 	puts("Reading...");
 
 	for (addr = buf, val = pattern; addr < end; addr++) {
-		WATCHDOG_RESET();
+		schedule();
 		readback = *addr;
 		if (readback != val) {
 			ulong offset = addr - buf;
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index d4e619b..b7daaa6 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -231,7 +231,7 @@
 			goto cleanup_register;
 		}
 
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 cleanup_register:
diff --git a/cmd/ximg.c b/cmd/ximg.c
index 65ba413..8533d0d 100644
--- a/cmd/ximg.c
+++ b/cmd/ximg.c
@@ -200,7 +200,7 @@
 
 				while (l > 0) {
 					tail = (l > CHUNKSZ) ? CHUNKSZ : l;
-					WATCHDOG_RESET();
+					schedule();
 					memmove(to, from, tail);
 					to += tail;
 					from += tail;
diff --git a/common/board_f.c b/common/board_f.c
index deb46be..f92d7b9 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -114,14 +114,14 @@
 	hw_watchdog_init();
 	puts("       Watchdog enabled\n");
 # endif
-	WATCHDOG_RESET();
+	schedule();
 
 	return 0;
 }
 
 int init_func_watchdog_reset(void)
 {
-	WATCHDOG_RESET();
+	schedule();
 
 	return 0;
 }
diff --git a/common/board_r.c b/common/board_r.c
index 062bc3e..50670b5 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -341,7 +341,7 @@
 	/*
 	 * Compute and print flash CRC if flashchecksum is set to 'y'
 	 *
-	 * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX
+	 * NOTE: Maybe we should add some schedule()? XXX
 	 */
 	if (env_get_yesno("flashchecksum") == 1) {
 		const uchar *flash_base = (const uchar *)CONFIG_SYS_FLASH_BASE;
diff --git a/common/cli_readline.c b/common/cli_readline.c
index f883b7f..f6e2bcd 100644
--- a/common/cli_readline.c
+++ b/common/cli_readline.c
@@ -274,7 +274,7 @@
 			while (!tstc()) {	/* while no incoming data */
 				if (get_ticks() >= etime)
 					return -2;	/* timed out */
-				WATCHDOG_RESET();
+				schedule();
 			}
 			first = 0;
 		}
@@ -595,7 +595,7 @@
 	for (;;) {
 		if (bootretry_tstc_timeout())
 			return -2;	/* timed out */
-		WATCHDOG_RESET();	/* Trigger watchdog, if needed */
+		schedule();	/* Trigger watchdog, if needed */
 
 		c = getchar();
 
diff --git a/common/console.c b/common/console.c
index bde9412..66b9813 100644
--- a/common/console.c
+++ b/common/console.c
@@ -480,7 +480,7 @@
 		 * Effectively poll for input wherever it may be available.
 		 */
 		for (;;) {
-			WATCHDOG_RESET();
+			schedule();
 			if (CONFIG_IS_ENABLED(CONSOLE_MUX)) {
 				/*
 				 * Upper layer may have already called tstc() so
diff --git a/common/dfu.c b/common/dfu.c
index 16bd1ba..9619088 100644
--- a/common/dfu.c
+++ b/common/dfu.c
@@ -101,7 +101,7 @@
 		if (dfu_reinit_needed)
 			goto exit;
 
-		WATCHDOG_RESET();
+		schedule();
 		usb_gadget_handle_interrupts(usbctrl_index);
 	}
 exit:
diff --git a/common/lcd.c b/common/lcd.c
index 0898bc0..a462b22 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -294,9 +294,9 @@
 	      BMP_LOGO_WIDTH, BMP_LOGO_HEIGHT, BMP_LOGO_COLORS);
 
 	if (bpix < 12) {
-		WATCHDOG_RESET();
+		schedule();
 		lcd_logo_set_cmap();
-		WATCHDOG_RESET();
+		schedule();
 
 		for (i = 0; i < BMP_LOGO_HEIGHT; ++i) {
 			memcpy(fb, bmap, BMP_LOGO_WIDTH);
@@ -320,7 +320,7 @@
 		}
 	}
 
-	WATCHDOG_RESET();
+	schedule();
 	lcd_sync();
 }
 #else
@@ -459,7 +459,7 @@
 			byte_width = width * 2;
 
 		for (i = 0; i < height; ++i) {
-			WATCHDOG_RESET();
+			schedule();
 			for (j = 0; j < width; j++) {
 				if (bpix != 16) {
 					fb_put_byte(&fb, &bmap);
@@ -488,7 +488,7 @@
 #if defined(CONFIG_BMP_16BPP)
 	case 16:
 		for (i = 0; i < height; ++i) {
-			WATCHDOG_RESET();
+			schedule();
 			for (j = 0; j < width; j++)
 				fb_put_word(&fb, &bmap);
 
diff --git a/common/menu.c b/common/menu.c
index 0d19601..8fe0096 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -435,7 +435,7 @@
 		printf("Hit any key to stop autoboot: %d ", menu->delay);
 		for (i = 0; i < 100; ++i) {
 			if (!tstc()) {
-				WATCHDOG_RESET();
+				schedule();
 				mdelay(10);
 				continue;
 			}
@@ -483,7 +483,7 @@
 		if (tstc()) {
 			c = getchar();
 		} else {
-			WATCHDOG_RESET();
+			schedule();
 			mdelay(10);
 			if (tstc())
 				c = getchar();
@@ -492,7 +492,7 @@
 		}
 	} else {
 		while (!tstc()) {
-			WATCHDOG_RESET();
+			schedule();
 			mdelay(10);
 		}
 		c = getchar();
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index d385bea..4cbc9ac 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -446,7 +446,7 @@
 	data = usb_kbd_dev->privptr;
 
 	while (data->usb_in_pointer == data->usb_out_pointer) {
-		WATCHDOG_RESET();
+		schedule();
 		usb_kbd_poll_for_event(usb_kbd_dev);
 	}
 
diff --git a/common/xyzModem.c b/common/xyzModem.c
index a68d392..fb319f7 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -68,7 +68,7 @@
 {
 
   ulong now = get_timer(0);
-  WATCHDOG_RESET();
+  schedule();
   while (!tstc ())
     {
       if (get_timer(now) > xyzModem_CHAR_TIMEOUT)
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 73da29a..b8840d2 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -62,7 +62,7 @@
 	/* the reset signal shall be asserted for et least 25 us */
 	udelay(25);
 
-	WATCHDOG_RESET();
+	schedule();
 
 	/* de-assert RESET signal */
 	ide_set_reset(0);
@@ -695,7 +695,7 @@
 	unsigned char c;
 	int i, bus;
 
-	WATCHDOG_RESET();
+	schedule();
 
 	/* ATAPI Drives seems to need a proper IDE Reset */
 	ide_reset();
@@ -745,7 +745,7 @@
 			puts("OK ");
 			ide_bus_ok[bus] = 1;
 		}
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	putc('\n');
@@ -775,7 +775,7 @@
 		}
 #endif
 	}
-	WATCHDOG_RESET();
+	schedule();
 
 #ifdef CONFIG_BLK
 	struct udevice *dev;
diff --git a/drivers/crypto/aspeed/aspeed_hace.c b/drivers/crypto/aspeed/aspeed_hace.c
index 1178cc6..a1b0b9f 100644
--- a/drivers/crypto/aspeed/aspeed_hace.c
+++ b/drivers/crypto/aspeed/aspeed_hace.c
@@ -302,7 +302,7 @@
 				return rc;
 
 			cur += chunk;
-			WATCHDOG_RESET();
+			schedule();
 		}
 	} else {
 		rc = aspeed_hace_update(dev, ctx, ibuf, ilen);
diff --git a/drivers/crypto/hash/hash_sw.c b/drivers/crypto/hash/hash_sw.c
index fea9d12..553c068 100644
--- a/drivers/crypto/hash/hash_sw.c
+++ b/drivers/crypto/hash/hash_sw.c
@@ -258,7 +258,7 @@
 				return rc;
 
 			cur += chunk;
-			WATCHDOG_RESET();
+			schedule();
 		}
 	} else {
 		rc = sw_hash_update(dev, ctx, ibuf, ilen);
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 4a8f8de..8ef5fa4 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -671,7 +671,7 @@
 
 int ddr_calibration_sequence(void)
 {
-	WATCHDOG_RESET();
+	schedule();
 
 	/* Check to see if SDRAM cal was success */
 	if (sdram_startup()) {
@@ -681,7 +681,7 @@
 
 	puts("DDRCAL: Success\n");
 
-	WATCHDOG_RESET();
+	schedule();
 
 	/* initialize the MMR register */
 	sdram_mmr_init();
diff --git a/drivers/ddr/altera/sdram_n5x.c b/drivers/ddr/altera/sdram_n5x.c
index 737a4e2..d903944 100644
--- a/drivers/ddr/altera/sdram_n5x.c
+++ b/drivers/ddr/altera/sdram_n5x.c
@@ -517,7 +517,7 @@
 			      DDR4_CRCPARSTAT_CMD_IN_ERR_WINDOW;
 
 		udelay(1);
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	return 0;
@@ -1349,7 +1349,7 @@
 		}
 
 		udelay(1);
-		WATCHDOG_RESET();
+		schedule();
 
 		/* Polling until SDRAM entered normal operating mode */
 		value = readl(umctl2_base + DDR4_STAT_OFFSET) &
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index 9b1710c..4716abf 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -161,7 +161,7 @@
 			sdram_clear_mem(start_addr, size_init);
 			size -= size_init;
 			start_addr += size_init;
-			WATCHDOG_RESET();
+			schedule();
 		}
 
 		bank++;
diff --git a/drivers/fpga/intel_sdm_mb.c b/drivers/fpga/intel_sdm_mb.c
index f5fd9a1..903d143 100644
--- a/drivers/fpga/intel_sdm_mb.c
+++ b/drivers/fpga/intel_sdm_mb.c
@@ -44,7 +44,7 @@
 
 		puts(".");
 		udelay(RECONFIG_STATUS_INTERVAL_DELAY_US);
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	return -ETIMEDOUT;
@@ -104,7 +104,7 @@
 
 			udelay(20000);
 		}
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	return 0;
@@ -252,7 +252,7 @@
 
 		puts(".");
 		udelay(RECONFIG_STATUS_INTERVAL_DELAY_US);
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	return -ETIMEDOUT;
@@ -378,7 +378,7 @@
 			if (resp_err && !xfer_count)
 				return resp_err;
 		}
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	return 0;
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index d808912..e86e3b7 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -383,7 +383,7 @@
 			printf("nstatus == 0 while waiting for condone\n");
 			return -EPERM;
 		}
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	if (i == FPGA_TIMEOUT_CNT)
@@ -534,7 +534,7 @@
 		rbf->section = unknown;
 		break;
 
-		WATCHDOG_RESET();
+		schedule();
 	}
 }
 
@@ -635,7 +635,7 @@
 				break;
 			}
 		}
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	if (!fpga_node_name) {
@@ -879,7 +879,7 @@
 
 		total_sizeof_image += buffer_sizebytes_ori;
 
-		WATCHDOG_RESET();
+		schedule();
 	}
 	wait_for_fifo_empty();
 
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index aa13af3..f80ff53 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -199,7 +199,7 @@
 		}
 		if ((sr & (state >> 8)) == (unsigned char)state)
 			return sr;
-		WATCHDOG_RESET();
+		schedule();
 		elapsed = get_timer(start_time);
 		if (elapsed > (CONFIG_SYS_HZ / 10))	/* .1 seconds */
 			break;
@@ -447,7 +447,7 @@
 		sda = dm_gpio_get_value(sda_gpio);
 		if ((sda & scl) == 1)
 			break;
-		WATCHDOG_RESET();
+		schedule();
 		elapsed = get_timer(start_time);
 		if (elapsed > (CONFIG_SYS_HZ / 5)) {	/* .2 seconds */
 			ret = -EBUSY;
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;
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 4950410..d34d8ee 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -584,7 +584,7 @@
 	reset_timer();
 #endif
 	start = get_timer(0);
-	WATCHDOG_RESET();
+	schedule();
 	while (flash_is_busy(info, sector)) {
 		if (get_timer(start) > tout) {
 			printf("Flash %s timeout at address %lx data %lx\n",
@@ -677,7 +677,7 @@
 	reset_timer();
 #endif
 	start = get_timer(0);
-	WATCHDOG_RESET();
+	schedule();
 	while (1) {
 		switch (info->portwidth) {
 		case FLASH_CFI_8BIT:
diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
index 090834a..99c2967 100644
--- a/drivers/mtd/nand/core.c
+++ b/drivers/mtd/nand/core.c
@@ -173,7 +173,7 @@
 	nanddev_offs_to_pos(nand, einfo->addr, &pos);
 	nanddev_offs_to_pos(nand, einfo->addr + einfo->len - 1, &last);
 	while (nanddev_pos_cmp(&pos, &last) <= 0) {
-		WATCHDOG_RESET();
+		schedule();
 		ret = nanddev_erase(nand, &pos);
 		if (ret) {
 			einfo->fail_addr = nanddev_pos_to_offs(nand, &pos);
diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c
index 06bf5ac..61bfd17 100644
--- a/drivers/mtd/nand/raw/atmel_nand.c
+++ b/drivers/mtd/nand/raw/atmel_nand.c
@@ -420,7 +420,7 @@
 	while (--timeout) {
 		if (pmecc_readl(host->pmerrloc, elisr) & PMERRLOC_CALC_DONE)
 			break;
-		WATCHDOG_RESET();
+		schedule();
 		udelay(1);
 	}
 
@@ -558,7 +558,7 @@
 	while (--timeout) {
 		if (!(pmecc_readl(host->pmecc, sr) & PMECC_SR_BUSY))
 			break;
-		WATCHDOG_RESET();
+		schedule();
 		udelay(1);
 	}
 
@@ -598,7 +598,7 @@
 	while (--timeout) {
 		if (!(pmecc_readl(host->pmecc, sr) & PMECC_SR_BUSY))
 			break;
-		WATCHDOG_RESET();
+		schedule();
 		udelay(1);
 	}
 
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 1a1a757..215b9ba 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -595,7 +595,7 @@
 
 		if (status & NAND_STATUS_READY)
 			break;
-		WATCHDOG_RESET();
+		schedule();
 	}
 };
 
@@ -2342,7 +2342,7 @@
 	while (1) {
 		unsigned int ecc_failures = mtd->ecc_stats.failed;
 
-		WATCHDOG_RESET();
+		schedule();
 		bytes = min(mtd->writesize - col, readlen);
 		aligned = (bytes == mtd->writesize);
 
@@ -2695,7 +2695,7 @@
 	page = realpage & chip->pagemask;
 
 	while (1) {
-		WATCHDOG_RESET();
+		schedule();
 
 		if (ops->mode == MTD_OPS_RAW)
 			ret = chip->ecc.read_oob_raw(mtd, chip, page);
@@ -3263,7 +3263,7 @@
 		else
 			use_bufpoi = 0;
 
-		WATCHDOG_RESET();
+		schedule();
 		/* Partial page write?, or need to use bounce buffer */
 		if (use_bufpoi) {
 			pr_debug("%s: using write bounce buffer for buf@%p\n",
@@ -3556,7 +3556,7 @@
 	instr->state = MTD_ERASING;
 
 	while (len) {
-		WATCHDOG_RESET();
+		schedule();
 
 		/* Check if we have a bad block, we do not erase bad blocks! */
 		if (!instr->scrub && nand_block_checkbad(mtd, ((loff_t) page) <<
diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c
index 5150607..b2345dc 100644
--- a/drivers/mtd/nand/raw/nand_util.c
+++ b/drivers/mtd/nand/raw/nand_util.c
@@ -103,7 +103,7 @@
 	     erased_length < erase_length;
 	     erase.addr += mtd->erasesize) {
 
-		WATCHDOG_RESET();
+		schedule();
 
 		if (opts->lim && (erase.addr >= (opts->offset + opts->lim))) {
 			puts("Size of erase exceeds limit\n");
@@ -638,7 +638,7 @@
 		size_t block_offset = offset & (mtd->erasesize - 1);
 		size_t write_size, truncated_write_size;
 
-		WATCHDOG_RESET();
+		schedule();
 
 		if (nand_block_isbad(mtd, block_start)) {
 			printf("Skip bad block 0x%08llx\n", block_start);
@@ -753,7 +753,7 @@
 		size_t block_offset = offset & (mtd->erasesize - 1);
 		size_t read_length;
 
-		WATCHDOG_RESET();
+		schedule();
 
 		if (nand_block_isbad(mtd, offset & ~(mtd->erasesize - 1))) {
 			printf("Skipping bad block 0x%08llx\n",
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index e533095..134bf22 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -579,7 +579,7 @@
 #endif
 
 	nanddev_io_for_each_page(nand, from, ops, &iter) {
-		WATCHDOG_RESET();
+		schedule();
 		ret = spinand_select_target(spinand, iter.req.pos.target);
 		if (ret)
 			break;
@@ -631,7 +631,7 @@
 #endif
 
 	nanddev_io_for_each_page(nand, to, ops, &iter) {
-		WATCHDOG_RESET();
+		schedule();
 		ret = spinand_select_target(spinand, iter.req.pos.target);
 		if (ret)
 			break;
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index f94597c..08fe7d4 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -478,7 +478,7 @@
 	u32 timeo = (CONFIG_SYS_HZ * 20) / 1000;
 	u32 time_start = get_timer(0);
 	do {
-		WATCHDOG_RESET();
+		schedule();
 		if (get_timer(time_start) > timeo)
 			return -EIO;
 		interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT);
@@ -1170,7 +1170,7 @@
 	u32 timeo = (CONFIG_SYS_HZ * 20) / 1000;
 	u32 time_start = get_timer(0);
 	do {
-		WATCHDOG_RESET();
+		schedule();
 		if (get_timer(time_start) > timeo)
 			return ONENAND_BBT_READ_FATAL_ERROR;
 		interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT);
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index f236e87..c73636d 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -958,7 +958,7 @@
 	addr_known = true;
 
 	while (len) {
-		WATCHDOG_RESET();
+		schedule();
 		if (!IS_ENABLED(CONFIG_SPL_BUILD) && ctrlc()) {
 			addr_known = false;
 			ret = -EINTR;
@@ -1721,7 +1721,7 @@
 	for (i = 0; i < len; ) {
 		ssize_t written;
 		loff_t addr = to + i;
-		WATCHDOG_RESET();
+		schedule();
 
 		/*
 		 * If page_size is a power of two, the offset can be quickly
diff --git a/drivers/net/octeontx2/nix.c b/drivers/net/octeontx2/nix.c
index a5665a2..f596b6b 100644
--- a/drivers/net/octeontx2/nix.c
+++ b/drivers/net/octeontx2/nix.c
@@ -580,7 +580,7 @@
 		__iowmb();
 		result = lmt_submit((u64)(nix->nix_base +
 					       NIXX_LF_OP_SENDX(0)));
-		WATCHDOG_RESET();
+		schedule();
 	} while (result == 0);
 
 	return 0;
diff --git a/drivers/net/octeontx2/nix_af.c b/drivers/net/octeontx2/nix_af.c
index cd098d6..c945ea0 100644
--- a/drivers/net/octeontx2/nix_af.c
+++ b/drivers/net/octeontx2/nix_af.c
@@ -65,7 +65,7 @@
 	start = get_timer(0);
 	while ((res->s.compcode == NPA_AQ_COMP_E_NOTDONE) &&
 	       (get_timer(start) < 1000))
-		WATCHDOG_RESET();
+		schedule();
 	if (res->s.compcode != NPA_AQ_COMP_E_GOOD) {
 		printf("%s: Error: result 0x%x not good\n",
 		       __func__, res->s.compcode);
@@ -111,7 +111,7 @@
 	start = get_timer(0);
 	while ((res->s.compcode == NPA_AQ_COMP_E_NOTDONE) &&
 	       (get_timer(start) < 1000))
-		WATCHDOG_RESET();
+		schedule();
 
 	if (res->s.compcode != NPA_AQ_COMP_E_GOOD) {
 		printf("%s: Error: result 0x%x not good\n",
@@ -136,7 +136,7 @@
 
 	do {
 		lf_rst.u = npa_af_reg_read(npa_af, NPA_AF_LF_RST());
-		WATCHDOG_RESET();
+		schedule();
 	} while (lf_rst.s.exec);
 
 	/* Set Aura size and enable caching of contexts */
@@ -199,7 +199,7 @@
 		start = get_timer(0);
 		while ((res->s.compcode == NPA_AQ_COMP_E_NOTDONE) &&
 		       (get_timer(start) < 1000))
-			WATCHDOG_RESET();
+			schedule();
 
 		if (res->s.compcode != NPA_AQ_COMP_E_GOOD) {
 			printf("%s: Error: result 0x%x not good for lf %d\n"
@@ -235,7 +235,7 @@
 		start = get_timer(0);
 		while ((res->s.compcode == NPA_AQ_COMP_E_NOTDONE) &&
 		       (get_timer(start) < 1000))
-			WATCHDOG_RESET();
+			schedule();
 
 		if (res->s.compcode != NPA_AQ_COMP_E_GOOD) {
 			printf("%s: Error: result 0x%x not good for lf %d\n"
@@ -255,7 +255,7 @@
 
 	do {
 		lf_rst.u = npa_af_reg_read(npa, NPA_AF_LF_RST());
-		WATCHDOG_RESET();
+		schedule();
 	} while (lf_rst.s.exec);
 
 	return 0;
@@ -286,7 +286,7 @@
 	/* Wait for reset to complete */
 	do {
 		blk_rst.u = npa_af_reg_read(npa_af, NPA_AF_BLK_RST());
-		WATCHDOG_RESET();
+		schedule();
 	} while (blk_rst.s.busy);
 
 	/* Set little Endian */
@@ -318,7 +318,7 @@
 	/* Wait for reset to complete */
 	do {
 		blk_rst.u = npa_af_reg_read(npa_af, NPA_AF_BLK_RST());
-		WATCHDOG_RESET();
+		schedule();
 	} while (blk_rst.s.busy);
 
 	rvu_aq_free(&npa_af->aq);
@@ -481,7 +481,7 @@
 	start = get_timer(0);
 	/* Wait for completion */
 	do {
-		WATCHDOG_RESET();
+		schedule();
 		dsb();
 	} while (result->s.compcode == 0 && get_timer(start) < 2);
 
@@ -645,7 +645,7 @@
 
 	do {
 		lf_rst.u = nix_af_reg_read(nix_af, NIXX_AF_LF_RST());
-		WATCHDOG_RESET();
+		schedule();
 	} while (lf_rst.s.exec);
 
 	/* Config NIX RQ HW context and base*/
@@ -767,7 +767,7 @@
 
 	do {
 		sw_sync.u = nix_af_reg_read(nix_af, NIXX_AF_RX_SW_SYNC());
-		WATCHDOG_RESET();
+		schedule();
 	} while (sw_sync.s.ena);
 
 	for (index = 0; index < rq_count; index++) {
@@ -832,7 +832,7 @@
 
 	do {
 		lf_rst.u = nix_af_reg_read(nix_af, NIXX_AF_LF_RST());
-		WATCHDOG_RESET();
+		schedule();
 	} while (lf_rst.s.exec);
 
 	return 0;
@@ -972,7 +972,7 @@
 	/* Wait for reset to complete */
 	do {
 		blk_rst.u = npc_af_reg_read(nix_af, NPC_AF_BLK_RST());
-		WATCHDOG_RESET();
+		schedule();
 	} while (blk_rst.s.busy);
 
 	debug("%s: npc af reset --\n", __func__);
@@ -1008,7 +1008,7 @@
 	/* Wait for reset to complete */
 	do {
 		blk_rst.u = nix_af_reg_read(nix_af, NIXX_AF_BLK_RST());
-		WATCHDOG_RESET();
+		schedule();
 	} while (blk_rst.s.busy);
 
 	/* Put in LE mode */
@@ -1031,7 +1031,7 @@
 	/* Wait for calibration to complete */
 	do {
 		af_status.u = nix_af_reg_read(nix_af, NIXX_AF_STATUS());
-		WATCHDOG_RESET();
+		schedule();
 	} while (af_status.s.calibrate_done == 0);
 
 	af_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_CFG());
@@ -1091,7 +1091,7 @@
 	/* Wait for reset to complete */
 	do {
 		blk_rst.u = nix_af_reg_read(nix_af, NIXX_AF_BLK_RST());
-		WATCHDOG_RESET();
+		schedule();
 	} while (blk_rst.s.busy);
 
 	rvu_aq_free(&nix_af->aq);
diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c
index 64262f1..c5f3354 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tests.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tests.c
@@ -169,7 +169,7 @@
 		return 1;
 	}
 	printf("loop #%d\n", *loop);
-	WATCHDOG_RESET();
+	schedule();
 
 	return 0;
 }
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index 1fb9ee5..90ccdf6 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -103,7 +103,7 @@
 	atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_USART_BASE;
 
 	while (!(readl(&usart->csr) & USART3_BIT(RXRDY)))
-		 WATCHDOG_RESET();
+		 schedule();
 	return readl(&usart->rhr);
 }
 
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 47bad6f..7592979 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -296,7 +296,7 @@
 	 * in puts().
 	 */
 	if (c == '\n')
-		WATCHDOG_RESET();
+		schedule();
 }
 
 #ifndef CONFIG_NS16550_MIN_FUNCTIONS
@@ -307,7 +307,7 @@
 		extern void usbtty_poll(void);
 		usbtty_poll();
 #endif
-		WATCHDOG_RESET();
+		schedule();
 	}
 	return serial_in(&com_port->rbr);
 }
@@ -395,7 +395,7 @@
 	 * in puts().
 	 */
 	if (ch == '\n')
-		WATCHDOG_RESET();
+		schedule();
 
 	return 0;
 }
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 30650e3..0d43e9b 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -246,7 +246,7 @@
 	do {
 		err = ops->getc(dev);
 		if (err == -EAGAIN)
-			WATCHDOG_RESET();
+			schedule();
 	} while (err == -EAGAIN);
 
 	return err >= 0 ? err : 0;
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index f0756c3..493a42b 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -114,7 +114,7 @@
 	lsr = readl(&regs->lsr);
 
 	if (input) {
-		WATCHDOG_RESET();
+		schedule();
 		return (lsr & BCM283X_MU_LSR_RX_READY) ? 1 : 0;
 	} else {
 		return (lsr & BCM283X_MU_LSR_TX_IDLE) ? 0 : 1;
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index ca49ef7..ff576da 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -169,7 +169,7 @@
 {
 	struct lpuart_fsl *base = plat->reg;
 	while (!(__raw_readb(&base->us1) & (US1_RDRF | US1_OR)))
-		WATCHDOG_RESET();
+		schedule();
 
 	barrier();
 
@@ -182,7 +182,7 @@
 	struct lpuart_fsl *base = plat->reg;
 
 	while (!(__raw_readb(&base->us1) & US1_TDRE))
-		WATCHDOG_RESET();
+		schedule();
 
 	__raw_writeb(c, &base->ud);
 }
@@ -330,7 +330,7 @@
 	lpuart_read32(plat->flags, &base->stat, &stat);
 	while ((stat & STAT_RDRF) == 0) {
 		lpuart_write32(plat->flags, &base->stat, STAT_FLAGS);
-		WATCHDOG_RESET();
+		schedule();
 		lpuart_read32(plat->flags, &base->stat, &stat);
 	}
 
@@ -358,7 +358,7 @@
 		if ((stat & STAT_TDRE))
 			break;
 
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	lpuart_write32(plat->flags, &base->data, c);
diff --git a/drivers/serial/serial_mpc8xx.c b/drivers/serial/serial_mpc8xx.c
index 0978930..aeae6ae 100644
--- a/drivers/serial/serial_mpc8xx.c
+++ b/drivers/serial/serial_mpc8xx.c
@@ -187,7 +187,7 @@
 	setbits_be16(&rtx->txbd.cbd_sc, BD_SC_READY);
 
 	while (in_be16(&rtx->txbd.cbd_sc) & BD_SC_READY)
-		WATCHDOG_RESET();
+		schedule();
 
 	return 0;
 }
@@ -204,7 +204,7 @@
 
 	/* Wait for character to show up. */
 	while (in_be16(&rtx->rxbd.cbd_sc) & BD_SC_EMPTY)
-		WATCHDOG_RESET();
+		schedule();
 
 	/* the characters are read one by one,
 	 * use the rxindex to know the next char to deliver
diff --git a/drivers/serial/serial_mt7620.c b/drivers/serial/serial_mt7620.c
index 5c5264b..b00e2f2 100644
--- a/drivers/serial/serial_mt7620.c
+++ b/drivers/serial/serial_mt7620.c
@@ -102,7 +102,7 @@
 	writel(ch, &plat->regs->thr);
 
 	if (ch == '\n')
-		WATCHDOG_RESET();
+		schedule();
 
 	return 0;
 }
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c
index a84f39b..22251c5 100644
--- a/drivers/serial/serial_mtk.c
+++ b/drivers/serial/serial_mtk.c
@@ -141,7 +141,7 @@
 	writel(ch, &priv->regs->thr);
 
 	if (ch == '\n')
-		WATCHDOG_RESET();
+		schedule();
 
 	return 0;
 }
@@ -295,7 +295,7 @@
 		do { \
 			err = _mtk_serial_getc(&mtk_hsuart##port); \
 			if (err == -EAGAIN) \
-				WATCHDOG_RESET(); \
+				schedule(); \
 		} while (err == -EAGAIN); \
 		return err >= 0 ? err : 0; \
 	} \
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 70a0e5e..315c136 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -200,7 +200,7 @@
 static int mxc_serial_getc(void)
 {
 	while (readl(&mxc_base->ts) & UTS_RXEMPTY)
-		WATCHDOG_RESET();
+		schedule();
 	return (readl(&mxc_base->rxd) & URXD_RX_DATA); /* mask out status from upper word */
 }
 
@@ -214,7 +214,7 @@
 
 	/* wait for transmitter to be ready */
 	while (!(readl(&mxc_base->ts) & UTS_TXEMPTY))
-		WATCHDOG_RESET();
+		schedule();
 }
 
 /* Test whether a character is in the RX buffer */
@@ -384,7 +384,7 @@
 	struct mxc_uart *base = (struct mxc_uart *)CONFIG_VAL(DEBUG_UART_BASE);
 
 	while (!(readl(&base->ts) & UTS_TXEMPTY))
-		WATCHDOG_RESET();
+		schedule();
 
 	writel(ch, &base->txd);
 }
diff --git a/drivers/serial/serial_octeon_bootcmd.c b/drivers/serial/serial_octeon_bootcmd.c
index 4bcff77..eff5c43 100644
--- a/drivers/serial/serial_octeon_bootcmd.c
+++ b/drivers/serial/serial_octeon_bootcmd.c
@@ -98,7 +98,7 @@
 	}
 
 	while (!octeon_bootcmd_pending(dev, true)) {
-		WATCHDOG_RESET();
+		schedule();
 		/*
 		 * ToDo:
 		 * The original code calls octeon_board_poll() here. We may
diff --git a/drivers/serial/serial_octeon_pcie_console.c b/drivers/serial/serial_octeon_pcie_console.c
index c76e787..b0eafe7 100644
--- a/drivers/serial/serial_octeon_pcie_console.c
+++ b/drivers/serial/serial_octeon_pcie_console.c
@@ -134,7 +134,7 @@
 							cons_ptr->input_write_index,
 							cons_ptr->input_read_index))) {
 			mdelay(10);
-			WATCHDOG_RESET();
+			schedule();
 		}
 	}
 
@@ -210,7 +210,7 @@
 			if (flags & OCT_PCI_CON_FLAG_NONBLOCK)
 				goto done;
 
-			WATCHDOG_RESET();
+			schedule();
 			mdelay(10);	/* Delay if we are spinning */
 		} else {
 			bytes_written = -1;
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(&regs->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);
 }
 
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index 4af1ff5..c449f3f 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -225,7 +225,7 @@
 			(struct uart_sifive *)CONFIG_VAL(DEBUG_UART_BASE);
 
 	while (_sifive_serial_putc(regs, ch) == -EAGAIN)
-		WATCHDOG_RESET();
+		schedule();
 }
 
 DEBUG_UART_FUNCS
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 295337a..4b18183 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -307,7 +307,7 @@
 	struct uart_zynq *regs = (struct uart_zynq *)CONFIG_VAL(DEBUG_UART_BASE);
 
 	while (_uart_zynq_serial_putc(regs, ch) == -EAGAIN)
-		WATCHDOG_RESET();
+		schedule();
 }
 
 DEBUG_UART_FUNCS
diff --git a/drivers/spi/mtk_snfi_spi.c b/drivers/spi/mtk_snfi_spi.c
index 65d0ce0..5ea6277 100644
--- a/drivers/spi/mtk_snfi_spi.c
+++ b/drivers/spi/mtk_snfi_spi.c
@@ -202,7 +202,7 @@
 	int addr_sh;
 	int ret;
 
-	WATCHDOG_RESET();
+	schedule();
 
 	ret = mtk_snfi_mac_reset(priv);
 	if (ret)
diff --git a/drivers/spi/octeon_spi.c b/drivers/spi/octeon_spi.c
index c2a7ee23..4bc38be 100644
--- a/drivers/spi/octeon_spi.c
+++ b/drivers/spi/octeon_spi.c
@@ -126,7 +126,7 @@
 
 	do {
 		mpi_sts = readq(base + MPI_STS);
-		WATCHDOG_RESET();
+		schedule();
 	} while (mpi_sts & MPI_STS_BUSY);
 
 	debug("%s(%s)\n", __func__, dev->name);
diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index ceba413..90c207d 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -172,7 +172,7 @@
 static void _stm32_qspi_read_fifo(u8 *val, void __iomem *addr)
 {
 	*val = readb(addr);
-	WATCHDOG_RESET();
+	schedule();
 }
 
 static void _stm32_qspi_write_fifo(u8 *val, void __iomem *addr)
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index 9522931..410bf72 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -176,7 +176,7 @@
 
 #if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
 	if (CONFIG_SYS_WATCHDOG_FREQ && (priv->timestamp % (CONFIG_SYS_WATCHDOG_FREQ)) == 0)
-		WATCHDOG_RESET();
+		schedule();
 #endif    /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */
 
 #ifdef CONFIG_LED_STATUS
@@ -189,7 +189,7 @@
 	ulong end = get_ticks() + ticks;
 
 	while (end > get_ticks())
-		WATCHDOG_RESET();
+		schedule();
 }
 
 static u64 mpc83xx_timer_get_count(struct udevice *dev)
diff --git a/drivers/usb/eth/lan7x.h b/drivers/usb/eth/lan7x.h
index f71e8c7..9480f4f 100644
--- a/drivers/usb/eth/lan7x.h
+++ b/drivers/usb/eth/lan7x.h
@@ -157,7 +157,7 @@
 		}
 
 		udelay(1);
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	debug("%s: Timeout (reg=0x%x mask=%08x wait_set=%i)\n", prefix, reg,
@@ -199,7 +199,7 @@
 		}
 
 		udelay(1);
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	debug("%s: Timeout (reg=0x%x mask=%08x wait_set=%i)\n", prefix, reg,
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index 388f73d..b2ddd1a 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -579,7 +579,7 @@
 
 	/* Wait for a character to arrive. */
 	while (!acm_stdio_tstc(dev))
-		WATCHDOG_RESET();
+		schedule();
 
 	buf_pop(&f_acm->rx_buf, &c, 1);
 
@@ -639,7 +639,7 @@
 		if (ctrlc())
 			return -ECANCELED;
 
-		WATCHDOG_RESET();
+		schedule();
 	}
 
 	return 0;
diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
index 0fa7230..74548ab 100644
--- a/drivers/usb/gadget/f_sdp.c
+++ b/drivers/usb/gadget/f_sdp.c
@@ -711,7 +711,7 @@
 			return 1;
 		}
 
-		WATCHDOG_RESET();
+		schedule();
 		usb_gadget_handle_interrupts(controller_index);
 	}
 
@@ -927,7 +927,7 @@
 		if (flag == SDP_EXIT)
 			return 0;
 
-		WATCHDOG_RESET();
+		schedule();
 		usb_gadget_handle_interrupts(controller_index);
 
 #ifdef CONFIG_SPL_BUILD
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f033198..d30f2a0 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -641,7 +641,7 @@
 		token = hc32_to_cpu(vtd->qt_token);
 		if (!(QT_TOKEN_GET_STATUS(token) & QT_TOKEN_STATUS_ACTIVE))
 			break;
-		WATCHDOG_RESET();
+		schedule();
 	} while (get_timer(ts) < timeout);
 	qhtoken = hc32_to_cpu(qh->qh_overlay.qt_token);
 
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index d186fac..62c5e8e 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -378,7 +378,7 @@
 
 int usb_gadget_handle_interrupts(int index)
 {
-	WATCHDOG_RESET();
+	schedule();
 	if (!gadget || !gadget->isr)
 		return -EINVAL;
 
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 4d2d961..082895a 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -329,7 +329,7 @@
 			byte_width = width;
 
 		for (i = 0; i < height; ++i) {
-			WATCHDOG_RESET();
+			schedule();
 			for (j = 0; j < width; j++) {
 				write_pix8(fb, bpix, eformat, palette, bmap);
 				bmap++;
@@ -342,7 +342,7 @@
 	case 16:
 		if (IS_ENABLED(CONFIG_BMP_16BPP)) {
 			for (i = 0; i < height; ++i) {
-				WATCHDOG_RESET();
+				schedule();
 				for (j = 0; j < width; j++) {
 					*fb++ = *bmap++;
 					*fb++ = *bmap++;
diff --git a/env/common.c b/env/common.c
index f9226e0..8dd05ff 100644
--- a/env/common.c
+++ b/env/common.c
@@ -115,7 +115,7 @@
 	if (gd->flags & GD_FLG_ENV_READY) { /* after import into hashtable */
 		struct env_entry e, *ep;
 
-		WATCHDOG_RESET();
+		schedule();
 
 		e.key	= name;
 		e.data	= NULL;
diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c
index 38e10e2..0d071b6 100644
--- a/fs/cramfs/uncompress.c
+++ b/fs/cramfs/uncompress.c
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <cyclic.h>
 #include <malloc.h>
 #include <watchdog.h>
 #include <u-boot/zlib.h>
@@ -62,7 +63,7 @@
 	stream.avail_in = 0;
 
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
-	stream.outcb = (cb_func)watchdog_reset_func;
+	stream.outcb = (cb_func)cyclic_run;
 #else
 	stream.outcb = Z_NULL;
 #endif /* CONFIG_HW_WATCHDOG */
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index ef7b302..49ba82e 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -1523,7 +1523,7 @@
 
 		/* Set buf_size to maximum length */
 		buf_size = DEFAULT_EMPTY_SCAN_SIZE;
-		WATCHDOG_RESET();
+		schedule();
 
 #ifdef CONFIG_JFFS2_SUMMARY
 		buf_len = sizeof(*sm);
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 3d0acbd..921e698 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -2,6 +2,7 @@
 #define _LINUX_COMPAT_H_
 
 #include <console.h>
+#include <cyclic.h>
 #include <log.h>
 #include <malloc.h>
 
@@ -230,7 +231,6 @@
 #define try_to_freeze(...)		0
 #define set_current_state(...)		do { } while (0)
 #define kthread_should_stop(...)	0
-#define schedule()			do { } while (0)
 
 #define setup_timer(timer, func, data) do {} while (0)
 #define del_timer_sync(timer) do {} while (0)
diff --git a/include/wait_bit.h b/include/wait_bit.h
index dcc5c4f..f1d70ae 100644
--- a/include/wait_bit.h
+++ b/include/wait_bit.h
@@ -63,7 +63,7 @@
 		}							\
 									\
 		udelay(1);						\
-		WATCHDOG_RESET();					\
+		schedule();					\
 	}								\
 									\
 	debug("%s: Timeout (reg=%p mask=%x wait_set=%i)\n", __func__,	\
diff --git a/include/watchdog.h b/include/watchdog.h
index 0a9777e..7a09346 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -88,14 +88,6 @@
 	#endif /* CONFIG_WATCHDOG && !__ASSEMBLY__ */
 #endif /* CONFIG_HW_WATCHDOG */
 
-#if !defined(__ASSEMBLY__)
-/* Currently only needed for fs/cramfs/uncompress.c */
-static inline void watchdog_reset_func(void)
-{
-	WATCHDOG_RESET();
-}
-#endif
-
 /*
  * Prototypes from $(CPU)/cpu.c.
  */
diff --git a/lib/bzip2/bzlib.c b/lib/bzip2/bzlib.c
index 377b269..bd589aa 100644
--- a/lib/bzip2/bzlib.c
+++ b/lib/bzip2/bzlib.c
@@ -844,7 +844,7 @@
 
    while (True) {
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
-	WATCHDOG_RESET();
+	schedule();
 #endif
       if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR;
       if (s->state == BZ_X_OUTPUT) {
diff --git a/lib/bzip2/bzlib_decompress.c b/lib/bzip2/bzlib_decompress.c
index 4412b8a..3b417d5 100644
--- a/lib/bzip2/bzlib_decompress.c
+++ b/lib/bzip2/bzlib_decompress.c
@@ -418,7 +418,7 @@
       while (True) {
 
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
-	WATCHDOG_RESET();
+	schedule();
 #endif
 	 if (nextSym == EOB) break;
 
@@ -503,7 +503,7 @@
 		     kk = MTFA_SIZE-1;
 		     for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) {
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
-			WATCHDOG_RESET();
+			schedule();
 #endif
 			for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
 			   s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj];
@@ -568,7 +568,7 @@
 	    while (i != s->origPtr);
 
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
-	WATCHDOG_RESET();
+	schedule();
 #endif
 	 s->tPos = s->origPtr;
 	 s->nblock_used = 0;
@@ -583,7 +583,7 @@
       } else {
 
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
-	WATCHDOG_RESET();
+	schedule();
 #endif
 	 /*-- compute the T^(-1) vector --*/
 	 for (i = 0; i < nblock; i++) {
diff --git a/lib/crc32.c b/lib/crc32.c
index 5a3127e..aa94d70 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -255,7 +255,7 @@
 			chunk = chunk_sz;
 		crc = crc32(crc, curr, chunk);
 		curr += chunk;
-		WATCHDOG_RESET ();
+		schedule();
 	}
 #else
 	crc = crc32(crc, buf, len);
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 1233418..8da3bb2 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -828,7 +828,7 @@
 		efi_signal_event(evt);
 	}
 	efi_process_event_queue();
-	WATCHDOG_RESET();
+	schedule();
 }
 
 /**
@@ -2193,7 +2193,7 @@
 
 	/* Give the payload some time to boot */
 	efi_set_watchdog(0);
-	WATCHDOG_RESET();
+	schedule();
 out:
 	if (IS_ENABLED(CONFIG_EFI_TCG2_PROTOCOL)) {
 		if (ret != EFI_SUCCESS)
diff --git a/lib/gunzip.c b/lib/gunzip.c
index a8e498d..932e3e8 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -251,7 +251,7 @@
 				puts("abort\n");
 				goto out;
 			}
-			WATCHDOG_RESET();
+			schedule();
 		} while (s.avail_out == 0);
 		/* done when inflate() says it's done */
 	} while (r != Z_STREAM_END);
diff --git a/lib/lzma/LzmaDec.c b/lib/lzma/LzmaDec.c
index 4f45f80..341149f 100644
--- a/lib/lzma/LzmaDec.c
+++ b/lib/lzma/LzmaDec.c
@@ -153,7 +153,7 @@
   UInt32 range = p->range;
   UInt32 code = p->code;
 
-  WATCHDOG_RESET();
+  schedule();
 
   do
   {
@@ -177,7 +177,7 @@
         state -= (state < 4) ? state : 3;
         symbol = 1;
 
-        WATCHDOG_RESET();
+        schedule();
 
         do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100);
       }
@@ -188,7 +188,7 @@
         state -= (state < 10) ? 3 : 6;
         symbol = 1;
 
-        WATCHDOG_RESET();
+        schedule();
 
         do
         {
@@ -321,7 +321,7 @@
               UInt32 mask = 1;
               unsigned i = 1;
 
-              WATCHDOG_RESET();
+              schedule();
 
               do
               {
@@ -335,7 +335,7 @@
           {
             numDirectBits -= kNumAlignBits;
 
-            WATCHDOG_RESET();
+            schedule();
 
             do
             {
@@ -409,7 +409,7 @@
           const Byte *lim = dest + curLen;
           dicPos += curLen;
 
-          WATCHDOG_RESET();
+          schedule();
 
           do
             *(dest) = (Byte)*(dest + src);
@@ -418,7 +418,7 @@
         else
         {
 
-          WATCHDOG_RESET();
+          schedule();
 
           do
           {
@@ -433,7 +433,7 @@
   }
   while (dicPos < limit && buf < bufLimit);
 
-  WATCHDOG_RESET();
+  schedule();
 
   NORMALIZE;
   p->buf = buf;
diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c
index af88900..55f64cd 100644
--- a/lib/lzma/LzmaTools.c
+++ b/lib/lzma/LzmaTools.c
@@ -104,7 +104,7 @@
     /* Decompress */
     outProcessed = min(outSizeFull, *uncompressedSize);
 
-    WATCHDOG_RESET();
+    schedule();
 
     res = LzmaDecode(
         outStream, &outProcessed,
diff --git a/lib/md5.c b/lib/md5.c
index 9d34465..1636ab9 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -304,7 +304,7 @@
 			chunk = chunk_sz;
 		MD5Update(&context, curr, chunk);
 		curr += chunk;
-		WATCHDOG_RESET ();
+		schedule();
 	}
 #else
 	MD5Update(&context, input, len);
diff --git a/lib/sha1.c b/lib/sha1.c
index e5e42bc..8d07407 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -344,7 +344,7 @@
 			chunk = chunk_sz;
 		sha1_update (&ctx, curr, chunk);
 		curr += chunk;
-		WATCHDOG_RESET ();
+		schedule();
 	}
 #else
 	sha1_update (&ctx, input, ilen);
diff --git a/lib/sha256.c b/lib/sha256.c
index 50b0b51..4d26aea 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -293,7 +293,7 @@
 			chunk = chunk_sz;
 		sha256_update(&ctx, curr, chunk);
 		curr += chunk;
-		WATCHDOG_RESET();
+		schedule();
 	}
 #else
 	sha256_update(&ctx, input, ilen);
diff --git a/lib/sha512.c b/lib/sha512.c
index a421f24..fbe8d5f 100644
--- a/lib/sha512.c
+++ b/lib/sha512.c
@@ -309,7 +309,7 @@
 			chunk = chunk_sz;
 		sha384_update(&ctx, curr, chunk);
 		curr += chunk;
-		WATCHDOG_RESET();
+		schedule();
 	}
 #else
 	sha384_update(&ctx, input, ilen);
@@ -372,7 +372,7 @@
 			chunk = chunk_sz;
 		sha512_update(&ctx, curr, chunk);
 		curr += chunk;
-		WATCHDOG_RESET();
+		schedule();
 	}
 #else
 	sha512_update(&ctx, input, ilen);
diff --git a/lib/time.c b/lib/time.c
index bbf191f..f3aaf47 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -198,7 +198,7 @@
 	ulong kv;
 
 	do {
-		WATCHDOG_RESET();
+		schedule();
 		kv = usec > CONFIG_WD_PERIOD ? CONFIG_WD_PERIOD : usec;
 		__udelay(kv);
 		usec -= kv;
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);
diff --git a/net/net.c b/net/net.c
index 81905f6..f9d11c0 100644
--- a/net/net.c
+++ b/net/net.c
@@ -559,7 +559,7 @@
 	 *	someone sets `net_state' to a state that terminates.
 	 */
 	for (;;) {
-		WATCHDOG_RESET();
+		schedule();
 		if (arp_timeout_check() > 0)
 			time_start = get_timer(0);
 
diff --git a/post/cpu/mpc83xx/ecc.c b/post/cpu/mpc83xx/ecc.c
index f88eff8..edd7411 100644
--- a/post/cpu/mpc83xx/ecc.c
+++ b/post/cpu/mpc83xx/ecc.c
@@ -73,7 +73,7 @@
 	for (addr = (u64*)CONFIG_SYS_POST_ECC_START_ADDR, errbit=0;
 	     addr < (u64*)CONFIG_SYS_POST_ECC_STOP_ADDR; addr++, errbit++ ) {
 
-		WATCHDOG_RESET();
+		schedule();
 
 		ecc_clear(ddr);
 
diff --git a/post/drivers/memory.c b/post/drivers/memory.c
index 4fb9355..d249942 100644
--- a/post/drivers/memory.c
+++ b/post/drivers/memory.c
@@ -279,7 +279,7 @@
 	for (i = 0; i < size / sizeof (ulong); i++) {
 		mem[i] = val;
 		if (i % 1024 == 0)
-			WATCHDOG_RESET();
+			schedule();
 	}
 
 	for (i = 0; i < size / sizeof (ulong) && !ret; i++) {
@@ -292,7 +292,7 @@
 			break;
 		}
 		if (i % 1024 == 0)
-			WATCHDOG_RESET();
+			schedule();
 	}
 
 	return ret;
@@ -308,7 +308,7 @@
 	for (i = 0; i < size / sizeof (ulong); i++) {
 		mem[i] = 1 << (i % 32);
 		if (i % 1024 == 0)
-			WATCHDOG_RESET();
+			schedule();
 	}
 
 	for (i = 0; i < size / sizeof (ulong) && !ret; i++) {
@@ -321,7 +321,7 @@
 			break;
 		}
 		if (i % 1024 == 0)
-			WATCHDOG_RESET();
+			schedule();
 	}
 
 	return ret;
@@ -337,7 +337,7 @@
 	for (i = 0; i < size / sizeof (ulong); i++) {
 		mem[i] = i;
 		if (i % 1024 == 0)
-			WATCHDOG_RESET();
+			schedule();
 	}
 
 	for (i = 0; i < size / sizeof (ulong) && !ret; i++) {
@@ -350,7 +350,7 @@
 			break;
 		}
 		if (i % 1024 == 0)
-			WATCHDOG_RESET();
+			schedule();
 	}
 
 	return ret;
@@ -366,7 +366,7 @@
 	for (i = 0; i < size / sizeof (ulong); i++) {
 		mem[i] = ~i;
 		if (i % 1024 == 0)
-			WATCHDOG_RESET();
+			schedule();
 	}
 
 	for (i = 0; i < size / sizeof (ulong) && !ret; i++) {
@@ -379,7 +379,7 @@
 			break;
 		}
 		if (i % 1024 == 0)
-			WATCHDOG_RESET();
+			schedule();
 	}
 
 	return ret;
@@ -390,15 +390,15 @@
 	int ret = 0;
 
 	ret = memory_post_dataline((unsigned long long *)start);
-	WATCHDOG_RESET();
+	schedule();
 	if (!ret)
 		ret = memory_post_addrline((ulong *)start, (ulong *)start,
 				size);
-	WATCHDOG_RESET();
+	schedule();
 	if (!ret)
 		ret = memory_post_addrline((ulong *)(start+size-8),
 				(ulong *)start, size);
-	WATCHDOG_RESET();
+	schedule();
 
 	return ret;
 }
@@ -408,25 +408,25 @@
 	int ret = 0;
 
 	ret = memory_post_test1(start, size, 0x00000000);
-	WATCHDOG_RESET();
+	schedule();
 	if (!ret)
 		ret = memory_post_test1(start, size, 0xffffffff);
-	WATCHDOG_RESET();
+	schedule();
 	if (!ret)
 		ret = memory_post_test1(start, size, 0x55555555);
-	WATCHDOG_RESET();
+	schedule();
 	if (!ret)
 		ret = memory_post_test1(start, size, 0xaaaaaaaa);
-	WATCHDOG_RESET();
+	schedule();
 	if (!ret)
 		ret = memory_post_test2(start, size);
-	WATCHDOG_RESET();
+	schedule();
 	if (!ret)
 		ret = memory_post_test3(start, size);
-	WATCHDOG_RESET();
+	schedule();
 	if (!ret)
 		ret = memory_post_test4(start, size);
-	WATCHDOG_RESET();
+	schedule();
 
 	return ret;
 }
diff --git a/post/lib_powerpc/cpu.c b/post/lib_powerpc/cpu.c
index 8506fd6..1d47107 100644
--- a/post/lib_powerpc/cpu.c
+++ b/post/lib_powerpc/cpu.c
@@ -61,7 +61,7 @@
 	int ic = icache_status();
 	int ret = 0;
 
-	WATCHDOG_RESET();
+	schedule();
 	if (ic)
 		icache_disable();
 
@@ -73,7 +73,7 @@
 		ret = cpu_post_test_two ();
 	if (ret == 0)
 		ret = cpu_post_test_twox ();
-	WATCHDOG_RESET();
+	schedule();
 	if (ret == 0)
 		ret = cpu_post_test_three ();
 	if (ret == 0)
@@ -82,7 +82,7 @@
 		ret = cpu_post_test_threei ();
 	if (ret == 0)
 		ret = cpu_post_test_andi ();
-	WATCHDOG_RESET();
+	schedule();
 	if (ret == 0)
 		ret = cpu_post_test_srawi ();
 	if (ret == 0)
@@ -91,7 +91,7 @@
 		ret = cpu_post_test_rlwinm ();
 	if (ret == 0)
 		ret = cpu_post_test_rlwimi ();
-	WATCHDOG_RESET();
+	schedule();
 	if (ret == 0)
 		ret = cpu_post_test_store ();
 	if (ret == 0)
@@ -100,20 +100,20 @@
 		ret = cpu_post_test_cr ();
 	if (ret == 0)
 		ret = cpu_post_test_b ();
-	WATCHDOG_RESET();
+	schedule();
 	if (ret == 0)
 		ret = cpu_post_test_multi ();
-	WATCHDOG_RESET();
+	schedule();
 	if (ret == 0)
 		ret = cpu_post_test_string ();
 	if (ret == 0)
 		ret = cpu_post_test_complex ();
-	WATCHDOG_RESET();
+	schedule();
 
 	if (ic)
 		icache_enable();
 
-	WATCHDOG_RESET();
+	schedule();
 
 	return ret;
 }
diff --git a/post/lib_powerpc/fpu/fpu.c b/post/lib_powerpc/fpu/fpu.c
index 0de76ce..bd65f62 100644
--- a/post/lib_powerpc/fpu/fpu.c
+++ b/post/lib_powerpc/fpu/fpu.c
@@ -43,7 +43,7 @@
 
 	int ret = 0;
 
-	WATCHDOG_RESET ();
+	schedule();
 
 	if (!fpu)
 		fpu_enable ();
@@ -66,7 +66,7 @@
 	if (!fpu)
 		fpu_disable ();
 
-	WATCHDOG_RESET ();
+	schedule();
 
 	return ret;
 }
diff --git a/post/post.c b/post/post.c
index d67c43e..b81425d 100644
--- a/post/post.c
+++ b/post/post.c
@@ -245,7 +245,7 @@
 {
 	if ((flags & test_flags & POST_ALWAYS) &&
 		(flags & test_flags & POST_MEM)) {
-		WATCHDOG_RESET();
+		schedule();
 
 		if (!(flags & POST_REBOOT)) {
 			if ((test_flags & POST_REBOOT) &&
@@ -350,7 +350,7 @@
 		}
 
 		if (i < post_list_size) {
-			WATCHDOG_RESET();
+			schedule();
 			return post_run_single(post_list + i,
 						test_flags[i],
 						flags, i);
diff --git a/test/common/cyclic.c b/test/common/cyclic.c
index a5c4e78..6e758e8 100644
--- a/test/common/cyclic.c
+++ b/test/common/cyclic.c
@@ -27,7 +27,7 @@
 					 NULL));
 
 	/* Execute all registered cyclic functions */
-	WATCHDOG_RESET();
+	schedule();
 	ut_asserteq(true, cyclic_active);
 
 	return 0;
diff --git a/test/dm/wdt.c b/test/dm/wdt.c
index 535f00a..653d7b1 100644
--- a/test/dm/wdt.c
+++ b/test/dm/wdt.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <cyclic.h>
 #include <dm.h>
 #include <wdt.h>
 #include <asm/gpio.h>
@@ -130,7 +131,7 @@
 	/* Neither device should be "started", so watchdog_reset() should be a no-op. */
 	reset_count = state->wdt.reset_count;
 	val = sandbox_gpio_get_value(gpio, offset);
-	watchdog_reset();
+	cyclic_run();
 	ut_asserteq(reset_count, state->wdt.reset_count);
 	ut_asserteq(val, sandbox_gpio_get_value(gpio, offset));
 
@@ -140,19 +141,19 @@
 
 	/* Make sure both devices have just been pinged. */
 	timer_test_add_offset(100);
-	watchdog_reset();
+	cyclic_run();
 	reset_count = state->wdt.reset_count;
 	val = sandbox_gpio_get_value(gpio, offset);
 
 	/* The gpio watchdog should be pinged, the sandbox one not. */
 	timer_test_add_offset(30);
-	watchdog_reset();
+	cyclic_run();
 	ut_asserteq(reset_count, state->wdt.reset_count);
 	ut_asserteq(!val, sandbox_gpio_get_value(gpio, offset));
 
 	/* After another ~30ms, both devices should get pinged. */
 	timer_test_add_offset(30);
-	watchdog_reset();
+	cyclic_run();
 	ut_asserteq(reset_count + 1, state->wdt.reset_count);
 	ut_asserteq(val, sandbox_gpio_get_value(gpio, offset));