[PATCH v2 0/4] Basic Allwinner WDT emulation

Strahinja Jankovic posted 4 patches 1 year, 1 month ago
There is a newer version of this series
docs/system/arm/cubieboard.rst      |   1 +
docs/system/arm/orangepi.rst        |   1 +
hw/arm/Kconfig                      |   2 +
hw/arm/allwinner-a10.c              |   7 +
hw/arm/allwinner-h3.c               |   8 +
hw/watchdog/Kconfig                 |   4 +
hw/watchdog/allwinner-wdt.c         | 416 ++++++++++++++++++++++++++++
hw/watchdog/meson.build             |   1 +
hw/watchdog/trace-events            |   7 +
include/hw/arm/allwinner-a10.h      |   2 +
include/hw/arm/allwinner-h3.h       |   5 +-
include/hw/watchdog/allwinner-wdt.h | 123 ++++++++
tests/avocado/boot_linux_console.py |  15 +-
13 files changed, 588 insertions(+), 4 deletions(-)
create mode 100644 hw/watchdog/allwinner-wdt.c
create mode 100644 include/hw/watchdog/allwinner-wdt.h
[PATCH v2 0/4] Basic Allwinner WDT emulation
Posted by Strahinja Jankovic 1 year, 1 month ago
This patch set introduces basic emulation of Allwinner WDT.
Since WDT in both A10 and H3 is part of Timer module, the WDT
functionality is added as an overlay in the memory map.

The focus was to enable reboot functionality, so WDT interrupt handling
is not covered in this patch set.

With these patches the `reboot` command can be used for both Cubieboard
and Orangepi-PC in order to restart the system.

Also, Cubieboard avocado tests have been improved to include reboot
steps as well.

v2:
- Cleaned up WDT implementation (changes only in patch 01/04)
- Removed unnecessary checks - instead of changing enum to start from 1,
  removed if (!c->regmap[offset]) since it was conflicting enum values
- Reorganized comments

Strahinja Jankovic (4):
  hw/watchdog: Allwinner WDT emulation for system reset
  hw/arm: Add WDT to Allwinner-A10 and Cubieboard
  hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC
  tests/avocado: Add reboot tests to Cubieboard

 docs/system/arm/cubieboard.rst      |   1 +
 docs/system/arm/orangepi.rst        |   1 +
 hw/arm/Kconfig                      |   2 +
 hw/arm/allwinner-a10.c              |   7 +
 hw/arm/allwinner-h3.c               |   8 +
 hw/watchdog/Kconfig                 |   4 +
 hw/watchdog/allwinner-wdt.c         | 416 ++++++++++++++++++++++++++++
 hw/watchdog/meson.build             |   1 +
 hw/watchdog/trace-events            |   7 +
 include/hw/arm/allwinner-a10.h      |   2 +
 include/hw/arm/allwinner-h3.h       |   5 +-
 include/hw/watchdog/allwinner-wdt.h | 123 ++++++++
 tests/avocado/boot_linux_console.py |  15 +-
 13 files changed, 588 insertions(+), 4 deletions(-)
 create mode 100644 hw/watchdog/allwinner-wdt.c
 create mode 100644 include/hw/watchdog/allwinner-wdt.h

-- 
2.30.2