mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
10107efedd
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>
46 lines
1.7 KiB
Makefile
46 lines
1.7 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# (C) Copyright 2008
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
obj-$(CONFIG_WDT_AT91) += at91sam9_wdt.o
|
|
ifneq (,$(filter $(SOC), mx25 mx31 mx35 mx5 mx6 mx7 vf610))
|
|
obj-y += imx_watchdog.o
|
|
else
|
|
obj-$(CONFIG_IMX_WATCHDOG) += imx_watchdog.o
|
|
endif
|
|
obj-$(CONFIG_S5P) += s5p_wdt.o
|
|
obj-$(CONFIG_XILINX_TB_WATCHDOG) += xilinx_tb_wdt.o
|
|
obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o
|
|
obj-$(CONFIG_DESIGNWARE_WATCHDOG) += designware_wdt.o
|
|
obj-$(CONFIG_ULP_WATCHDOG) += ulp_wdog.o
|
|
obj-$(CONFIG_$(SPL_TPL_)WDT) += wdt-uclass.o
|
|
obj-$(CONFIG_WDT_SANDBOX) += sandbox_wdt.o
|
|
obj-$(CONFIG_WDT_ALARM_SANDBOX) += sandbox_alarm-wdt.o
|
|
obj-$(CONFIG_WDT_APPLE) += apple_wdt.o
|
|
obj-$(CONFIG_WDT_ARMADA_37XX) += armada-37xx-wdt.o
|
|
obj-$(CONFIG_WDT_ASPEED) += ast_wdt.o
|
|
obj-$(CONFIG_WDT_AST2600) += ast2600_wdt.o
|
|
obj-$(CONFIG_WDT_BCM6345) += bcm6345_wdt.o
|
|
obj-$(CONFIG_WDT_BOOKE) += booke_wdt.o
|
|
obj-$(CONFIG_WDT_CORTINA) += cortina_wdt.o
|
|
obj-$(CONFIG_WDT_ORION) += orion_wdt.o
|
|
obj-$(CONFIG_WDT_CDNS) += cdns_wdt.o
|
|
obj-$(CONFIG_WDT_GPIO) += gpio_wdt.o
|
|
obj-$(CONFIG_WDT_MAX6370) += max6370_wdt.o
|
|
obj-$(CONFIG_WDT_MESON_GXBB) += meson_gxbb_wdt.o
|
|
obj-$(CONFIG_WDT_MPC8xx) += mpc8xx_wdt.o
|
|
obj-$(CONFIG_WDT_MT7620) += mt7620_wdt.o
|
|
obj-$(CONFIG_WDT_MT7621) += mt7621_wdt.o
|
|
obj-$(CONFIG_WDT_MTK) += mtk_wdt.o
|
|
obj-$(CONFIG_WDT_NPCM) += npcm_wdt.o
|
|
obj-$(CONFIG_WDT_OCTEONTX) += octeontx_wdt.o
|
|
obj-$(CONFIG_WDT_OMAP3) += omap_wdt.o
|
|
obj-$(CONFIG_WDT_SBSA) += sbsa_gwdt.o
|
|
obj-$(CONFIG_WDT_K3_RTI) += rti_wdt.o
|
|
obj-$(CONFIG_WDT_SL28CPLD) += sl28cpld-wdt.o
|
|
obj-$(CONFIG_WDT_SP805) += sp805_wdt.o
|
|
obj-$(CONFIG_WDT_STM32MP) += stm32mp_wdt.o
|
|
obj-$(CONFIG_WDT_SUNXI) += sunxi_wdt.o
|
|
obj-$(CONFIG_WDT_TANGIER) += tangier_wdt.o
|
|
obj-$(CONFIG_WDT_XILINX) += xilinx_wwdt.o
|