watchdog: wdt_aspeed: Add support for the reset width register
[qemu/ar7.git] / include / hw / watchdog / wdt_aspeed.h
blob7de3e5c224fbb6cd374711cf3275572b48dd3e34
1 /*
2 * ASPEED Watchdog Controller
4 * Copyright (C) 2016-2017 IBM Corp.
6 * This code is licensed under the GPL version 2 or later. See the
7 * COPYING file in the top-level directory.
8 */
9 #ifndef ASPEED_WDT_H
10 #define ASPEED_WDT_H
12 #include "hw/sysbus.h"
14 #define TYPE_ASPEED_WDT "aspeed.wdt"
15 #define ASPEED_WDT(obj) \
16 OBJECT_CHECK(AspeedWDTState, (obj), TYPE_ASPEED_WDT)
18 #define ASPEED_WDT_REGS_MAX (0x20 / 4)
20 typedef struct AspeedWDTState {
21 /*< private >*/
22 SysBusDevice parent_obj;
23 QEMUTimer *timer;
25 /*< public >*/
26 MemoryRegion iomem;
27 uint32_t regs[ASPEED_WDT_REGS_MAX];
29 uint32_t pclk_freq;
30 uint32_t silicon_rev;
31 uint32_t ext_pulse_width_mask;
32 } AspeedWDTState;
34 #endif /* ASPEED_WDT_H */