On non-x86, QEMU only offers a watchdog via the PCI-attached Intel 6300
ESB. Add a driver for it and make sure it is probed during board init.

Background for adding this feature is testing complex system
integrations that include watchdog-monitored OTA OS updates, e.g. [1].

Changes in v3:
 - reload after timer preload setting
 - initialize max_timeout_ms
 - null-check register base
 - code de-duplication *** BLURB HERE *** style fixes
 - prevent reprobing of already activated devices

Changes in v2:
 - fix a compilation issue of the driver on riscv
 - add late probing to qemu

Jan

[1] https://gitlab.com/cip-project/cip-core/isar-cip-core

Jan Kiszka (3):
  watchdog: Add support for i6300esb
  watchdog: add support to call initr_watchdog multiple times
  board: qemu: arm/riscv: Probe watchdogs late

 board/emulation/qemu-arm/qemu-arm.c     |   5 +
 board/emulation/qemu-riscv/qemu-riscv.c |   5 +
 drivers/watchdog/Kconfig                |   9 ++
 drivers/watchdog/Makefile               |   1 +
 drivers/watchdog/i6300esb-wdt.c         | 152 ++++++++++++++++++++++++
 drivers/watchdog/wdt-uclass.c           |   7 ++
 6 files changed, 179 insertions(+)
 create mode 100644 drivers/watchdog/i6300esb-wdt.c

-- 
2.47.3

Reply via email to