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