u-boot/drivers/watchdog
Rasmus Villemoes 10107efedd sandbox: add SIGALRM-based watchdog device
In order to test that U-Boot actually maintains the watchdog device(s)
during long-running busy-loops, such as those where we wait for the
user to stop autoboot, we need a watchdog device that actually does
something during those loops; we cannot test that behaviour via the DM
test framework.

So introduce a relatively simple watchdog device which is simply based
on calling the host OS' alarm() function; that has the nice property
that a new call to alarm() simply sets a new deadline, and alarm(0)
cancels any existing alarm. These properties are precisely what we
need to implement start/reset/stop. We install our own handler so that
we get a known message printed if and when the watchdog fires, and by
just invoking that handler directly, we get expire_now for free.

The actual calls to the various OS functions (alarm, signal, raise)
need to be done in os.c, and since the driver code cannot get access
to the values of SIGALRM or SIG_DFL (that would require including a
host header, and that's only os.c which can do that), we cannot simply
do trivial wrappers for signal() and raise(), but instead create
specialized functions just for use by this driver.

Apart from enabling this driver for sandbox{,64}_defconfig, also
enable the wdt command which was useful for hand-testing this new
driver (especially with running u-boot under strace).

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2022-10-24 11:10:21 +02:00
..
apple_wdt.c watchdog: Add a driver for the Apple watchdog 2022-01-13 06:55:46 +01:00
armada-37xx-wdt.c treewide: Fix Marek's name and change my e-mail address 2022-07-21 10:14:04 +02:00
ast2600_wdt.c wdt: aspeed: Add AST2600 watchdog support 2021-01-18 15:23:05 -05:00
ast_wdt.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
at91sam9_wdt.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
bcm6345_wdt.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
booke_wdt.c watchdog: Add booke watchdog driver 2021-04-15 14:22:17 +05:30
cdns_wdt.c watchdog: cadence: Add expire_now method 2021-07-01 09:25:06 +02:00
cortina_wdt.c watchdog: cortina_wdt: add support for HW WDT on CAxxxx SoCs 2020-02-07 16:15:57 -05:00
designware_wdt.c watchdog: designware: Make this depend on WDT 2022-07-05 17:03:01 -04:00
gpio_wdt.c watchdog: gpio_wdt: use __udelay() to avoid recursion 2022-09-27 12:25:40 +02:00
imx_watchdog.c reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
Kconfig sandbox: add SIGALRM-based watchdog device 2022-10-24 11:10:21 +02:00
Makefile sandbox: add SIGALRM-based watchdog device 2022-10-24 11:10:21 +02:00
max6370_wdt.c watchdog: max6370: use __udelay() to avoid recursion 2022-09-27 12:25:51 +02:00
meson_gxbb_wdt.c watchdog: add amlogic watchdog support 2022-07-21 08:09:06 +02:00
mpc8xx_wdt.c watchdog: mpc8xx_wdt: Allow selection of watchdog mode through environment 2020-04-24 10:09:59 -04:00
mt7620_wdt.c watchdog: add watchdog driver for MediaTek MT7620 SoC 2021-01-24 21:39:26 +01:00
mt7621_wdt.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mtk_wdt.c watchdog: mediatek: add support for MediaTek MT7986 SoC 2022-09-23 15:09:15 -04:00
npcm_wdt.c wdt: nuvoton: add expire function for generic reset 2022-10-24 11:06:24 +02:00
octeontx_wdt.c watchdog: octeontx_wdt: Add MIPS Octeon support 2022-07-21 08:09:06 +02:00
omap_wdt.c watchdog: omap_wdt: Switch required include for watchdog defines 2022-10-18 13:40:40 -04:00
orion_wdt.c treewide: Fix Marek's name and change my e-mail address 2022-07-21 10:14:04 +02:00
rti_wdt.c watchdog: rti_wdt: Add 10% safety margin to clock frequency 2022-03-08 09:08:09 +01:00
s5p_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sandbox_alarm-wdt.c sandbox: add SIGALRM-based watchdog device 2022-10-24 11:10:21 +02:00
sandbox_wdt.c sandbox: fix sandbox_wdt_expire_now() 2021-11-13 08:16:52 -07:00
sbsa_gwdt.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sl28cpld-wdt.c watchdog: add sl28cpld watchdog driver 2022-02-28 11:59:35 +05:30
sp805_wdt.c watchdog: sp805_wdt: use correct compatible string 2021-11-09 17:18:23 +05:30
stm32mp_wdt.c watchdog: stm32mp: migrate trace to dev macro 2021-01-13 09:52:58 +01:00
sunxi_wdt.c watchdog: Add a driver for the sunxi watchdog 2021-10-25 14:54:26 +01:00
tangier_wdt.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
ulp_wdog.c mx7ulp: wdog: Wait for WDOG unlock and reconfiguration to complete 2021-07-17 14:59:56 +02:00
wdt-uclass.c watchdog: introduce a u-boot,autostart property 2022-10-24 11:09:19 +02:00
xilinx_tb_wdt.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
xilinx_wwdt.c watchdog: versal: Add support for expire now 2021-09-30 12:30:38 +02:00