aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-18 08:34:31 -0400
committerTom Rini <trini@konsulko.com>2022-09-18 08:34:31 -0400
commitb6c50e5831f6ce3800d4b3cf3c7aa35dde8c48d9 (patch)
tree4403d1b2ff259014c01855e08191ad0d1c294741 /arch
parentd219fc06b30d4b1ac4fac6c40b2ca69cb5ecf642 (diff)
parent8695fbb3a7ff3640eff62f7123323b16546d5b35 (diff)
downloadu-boot-b6c50e5831f6ce3800d4b3cf3c7aa35dde8c48d9.zip
u-boot-b6c50e5831f6ce3800d4b3cf3c7aa35dde8c48d9.tar.gz
u-boot-b6c50e5831f6ce3800d4b3cf3c7aa35dde8c48d9.tar.bz2
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-watchdog into nextWIP/18Sep2022-next
- Migrate watchdog reset to cyclic infrastructure (Stefan)
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/phy.c2
-rw-r--r--arch/arm/mach-imx/i2c-mxv7.c2
-rw-r--r--arch/arm/mach-socfpga/spl_a10.c8
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c6
-rw-r--r--arch/m68k/lib/time.c2
-rw-r--r--arch/powerpc/cpu/mpc8xx/cpu_init.c2
-rw-r--r--arch/powerpc/lib/bootm.c6
-rw-r--r--arch/powerpc/lib/cache.c2
-rw-r--r--arch/powerpc/lib/interrupts.c2
-rw-r--r--arch/powerpc/lib/ticks.S5
10 files changed, 19 insertions, 18 deletions
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 @@ void at91_phy_reset(void)
/* 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 @@ int force_idle_bus(void *priv)
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 @@ void spl_board_init(void)
/* enable console uart printing */
preloader_console_init();
- WATCHDOG_RESET();
+ schedule();
arch_early_init_r();
@@ -203,7 +203,7 @@ void spl_board_init(void)
*/
set_regular_boot(true);
- WATCHDOG_RESET();
+ schedule();
reset_cpu();
}
@@ -268,11 +268,11 @@ void board_init_f(ulong dummy)
/* 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 @@ static int stm32prog_serial_getc_err(void)
err = ops->getc(down_serial_dev);
if (err == -EAGAIN) {
ctrlc();
- WATCHDOG_RESET();
+ schedule();
}
} while ((err == -EAGAIN) && (!had_ctrlc()));
@@ -276,7 +276,7 @@ static bool stm32prog_serial_get_buffer(u8 *buffer, u32 *count)
*count -= 1;
} else if (err == -EAGAIN) {
ctrlc();
- WATCHDOG_RESET();
+ schedule();
if (get_timer(start) > TIMEOUT_SERIAL_BUFFER) {
err = -ETIMEDOUT;
break;
@@ -852,7 +852,7 @@ bool stm32prog_serial_loop(struct stm32prog_data *data)
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 @@ void dtimer_interrupt(void *not_used)
#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 @@ void cpu_init_f(immap_t __iomem *immr)
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 @@ static void boot_jump_linux(bootm_headers_t *images)
* 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 @@ static void boot_jump_linux(bootm_headers_t *images)
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 @@ void boot_jump_vxworks(bootm_headers_t *images)
* 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 @@ static ulong maybe_watchdog_reset(ulong flushed)
{
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 @@ void timer_interrupt(struct pt_regs *regs)
#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/arch/powerpc/lib/ticks.S b/arch/powerpc/lib/ticks.S
index c487f93..8647d77 100644
--- a/arch/powerpc/lib/ticks.S
+++ b/arch/powerpc/lib/ticks.S
@@ -9,7 +9,6 @@
#include <ppc_asm.tmpl>
#include <ppc_defs.h>
#include <config.h>
-#include <watchdog.h>
/*
* unsigned long long get_ticks(void);
@@ -42,7 +41,9 @@ wait_ticks:
addc r14, r4, r14 /* Compute end time lower */
addze r15, r3 /* and end time upper */
- WATCHDOG_RESET /* Trigger watchdog, if needed */
+#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
+ bl schedule /* Trigger watchdog, if needed */
+#endif
1: bl get_ticks /* Get current time */
subfc r4, r4, r14 /* Subtract current time from end time */
subfe. r3, r3, r15