summary refs log tree commit diff stats
path: root/include/hw/watchdog
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2017-09-04 15:21:54 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-09-04 15:21:54 +0100
commitf55d613bc97cd8d08487eddec313c3298a906a91 (patch)
treeda46c15c3b8a14e1d174810ad95d2d8e2e95fcfa /include/hw/watchdog
parentb2bfe9f7f1f7e3aa5edf9c3c4c7408082778ae17 (diff)
downloadfocaccia-qemu-f55d613bc97cd8d08487eddec313c3298a906a91.tar.gz
focaccia-qemu-f55d613bc97cd8d08487eddec313c3298a906a91.zip
watchdog: wdt_aspeed: Add support for the reset width register
The reset width register controls how the pulse on the SoC's WDTRST{1,2}
pins behaves. A pulse is emitted if the external reset bit is set in
WDT_CTRL. On the AST2500 WDT_RESET_WIDTH can consume magic bit patterns
to configure push-pull/open-drain and active-high/active-low
behaviours and thus needs some special handling in the write path.

As some of the capabilities depend on the SoC version a silicon-rev
property is introduced, which is used to guard version-specific
behaviour.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/watchdog')
-rw-r--r--include/hw/watchdog/wdt_aspeed.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/watchdog/wdt_aspeed.h b/include/hw/watchdog/wdt_aspeed.h
index 080c223122..7de3e5c224 100644
--- a/include/hw/watchdog/wdt_aspeed.h
+++ b/include/hw/watchdog/wdt_aspeed.h
@@ -27,6 +27,8 @@ typedef struct AspeedWDTState {
     uint32_t regs[ASPEED_WDT_REGS_MAX];
 
     uint32_t pclk_freq;
+    uint32_t silicon_rev;
+    uint32_t ext_pulse_width_mask;
 } AspeedWDTState;
 
 #endif  /* ASPEED_WDT_H */