Skip to content

hw/arm: Implement i.MX watchdog support

Guenter Roeck qemu-devel 3 versions – Applied

Status from this message: Applied to target-arm.next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 3 repliesApplied
  2. v28 patches 6 repliesSuperseded
  3. v18 patches 7 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/8hw: Move i.MX watchdog driver to hw/watchdogMAINTAINERS hw/arm/Kconfig hw/misc/Makefile.objs +7 more+13 -50 replies
2/8hw/watchdog: Implement full i.MX watchdog supporthw/watchdog/wdt_imx2.c include/hw/watchdog/wdt_imx2.h+284 -142 replies
3/8hw/arm/fsl-imx25: Wire up watchdoghw/arm/Kconfig hw/arm/fsl-imx25.c include/hw/arm/fsl-imx25.h+16 -00 replies
4/8hw/arm/fsl-imx31: Wire up watchdoghw/arm/Kconfig hw/arm/fsl-imx31.c include/hw/arm/fsl-imx31.h+11 -00 replies
5/8hw/arm/fsl-imx6: Connect watchdog interruptshw/arm/fsl-imx6.c+9 -00 replies
6/8hw/arm/fsl-imx6ul: Connect watchdog interruptshw/arm/fsl-imx6ul.c+10 -00 replies
7/8hw/arm/fsl-imx7: Instantiate various unimplemented deviceshw/arm/fsl-imx7.c include/hw/arm/fsl-imx7.h+40 -00 replies
8/8hw/arm/fsl-imx7: Connect watchdog interruptshw/arm/fsl-imx7.c include/hw/arm/fsl-imx7.h+16 -00 replies

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéPeter Maydell
1/8R-b
2/8
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/8] hw/arm: Implement i.MX watchdog support

The current i.MX watchdog implementation only supports resets. This patch series implements the full watchdog, including optional pretimeout support.

Notable changes:
- The existing i.MX watchdog emulation (which only emulates syste resets) is moved from hw/misc to hw/watchdog and renamed to match the naming convention in hw/watchdog (patch 1/8).
- Full watchdog support is implemented in patch 2/8.
- The watchdog is wired up for i.MX25 and i.MX31 emulations (patch 3/8 and 4/8).
- The watchdog interrupt (for pretimeout support) is connected for i.MX6, i.MX6UL, and i.MX7 emulations (patch 5/8, 6/8, and 8/8).
- For i.MX7, various devices are wired up as unimplemented devices (patch 7/8). This was necessary to avoid crashes when booting recent Linux kernels.

The code was tested with all available emulations.

v3: Improve handling of write-once registers and bits
Stop timers in reset function
Use explicit policy for timers

v2: Select WDT_IMX2 explicitly for supported platforms, not automatically
with IMX
Rebased to current master (as of 3/22)
Fixed typo "octop" -> "ocotp"
Added Reviewed-by: tags where given

----------------------------------------------------------------
Guenter Roeck (8):
hw: Move i.MX watchdog driver to hw/watchdog hw/watchdog: Implement full i.MX watchdog support hw/arm/fsl-imx25: Wire up watchdog hw/arm/fsl-imx31: Wire up watchdog hw/arm/fsl-imx6: Connect watchdog interrupts hw/arm/fsl-imx6ul: Connect watchdog interrupts hw/arm/fsl-imx7: Instantiate various unimplemented devices hw/arm/fsl-imx7: Connect watchdog interrupts

 MAINTAINERS                    |   2 +
 hw/arm/Kconfig                 |   5 +
 hw/arm/fsl-imx25.c             |  10 ++
 hw/arm/fsl-imx31.c             |   6 +
 hw/arm/fsl-imx6.c              |   9 ++
 hw/arm/fsl-imx6ul.c            |  10 ++
 hw/arm/fsl-imx7.c              |  35 ++++++
 hw/misc/Makefile.objs          |   1 -
 hw/misc/imx2_wdt.c             |  90 --------------
 hw/watchdog/Kconfig            |   3 +
 hw/watchdog/Makefile.objs      |   1 +
 hw/watchdog/wdt_imx2.c         | 262 +++++++++++++++++++++++++++++++++++++++++
 include/hw/arm/fsl-imx25.h     |   5 +
 include/hw/arm/fsl-imx31.h     |   4 +
 include/hw/arm/fsl-imx6.h      |   2 +-
 include/hw/arm/fsl-imx6ul.h    |   2 +-
 include/hw/arm/fsl-imx7.h      |  23 +++-
 include/hw/misc/imx2_wdt.h     |  33 ------
 include/hw/watchdog/wdt_imx2.h |  78 ++++++++++++
 19 files changed, 454 insertions(+), 127 deletions(-)
 delete mode 100644 hw/misc/imx2_wdt.c
 create mode 100644 hw/watchdog/wdt_imx2.c
 delete mode 100644 include/hw/misc/imx2_wdt.h
 create mode 100644 include/hw/watchdog/wdt_imx2.h