watchdog: wdt_aspeed: Add support for the reset width register
commitf55d613bc97cd8d08487eddec313c3298a906a91
authorAndrew Jeffery <andrew@aj.id.au>
Mon, 4 Sep 2017 14:21:54 +0000 (4 15:21 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 4 Sep 2017 14:21:54 +0000 (4 15:21 +0100)
treeda46c15c3b8a14e1d174810ad95d2d8e2e95fcfa
parentb2bfe9f7f1f7e3aa5edf9c3c4c7408082778ae17
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>
hw/watchdog/wdt_aspeed.c
include/hw/watchdog/wdt_aspeed.h