diff options
author | maxims@google.com | 2017-04-17 12:00:21 -0700 |
---|---|---|
committer | Tom Rini | 2017-05-08 11:57:30 -0400 |
commit | 0753bc2d30d7ca4a0ea4ef7f97083961c3a9d0e0 (patch) | |
tree | ddeb5811ed8c1e75572e109c989f0ce593c8b385 /arch/sandbox/include/asm | |
parent | 17c5fb195376f5883b7f0fdfbf19e42e3be7de43 (diff) |
dm: Simple Watchdog uclass
This is a simple uclass for Watchdog Timers. It has four operations:
start, restart, reset, stop. Drivers must implement start, restart and
stop operations, while implementing reset is optional: It's default
implementation expires watchdog timer in one clock tick.
Signed-off-by: Maxim Sloyko <maxims@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include/asm')
-rw-r--r-- | arch/sandbox/include/asm/state.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h index 149f28d8732..987cc7b49dc 100644 --- a/arch/sandbox/include/asm/state.h +++ b/arch/sandbox/include/asm/state.h @@ -39,6 +39,12 @@ struct sandbox_spi_info { struct udevice *emul; }; +struct sandbox_wdt_info { + unsigned long long counter; + uint reset_count; + bool running; +}; + /* The complete state of the test system */ struct sandbox_state { const char *cmd; /* Command to execute */ @@ -69,6 +75,9 @@ struct sandbox_state { /* Pointer to information for each SPI bus/cs */ struct sandbox_spi_info spi[CONFIG_SANDBOX_SPI_MAX_BUS] [CONFIG_SANDBOX_SPI_MAX_CS]; + + /* Information about Watchdog */ + struct sandbox_wdt_info wdt; }; /* Minimum space we guarantee in the state FDT when calling read/write*/ |