1 /* 2 * ASPEED Watchdog Controller 3 * 4 * Copyright (C) 2016-2017 IBM Corp. 5 * 6 * This code is licensed under the GPL version 2 or later. See the 7 * COPYING file in the top-level directory. 8 */ 9 10 #ifndef WDT_ASPEED_H 11 #define WDT_ASPEED_H 12 13 #include "hw/sysbus.h" 14 15 #define TYPE_ASPEED_WDT "aspeed.wdt" 16 #define ASPEED_WDT(obj) \ 17 OBJECT_CHECK(AspeedWDTState, (obj), TYPE_ASPEED_WDT) 18 19 #define ASPEED_WDT_REGS_MAX (0x20 / 4) 20 21 typedef struct AspeedWDTState { 22 /*< private >*/ 23 SysBusDevice parent_obj; 24 QEMUTimer *timer; 25 26 /*< public >*/ 27 MemoryRegion iomem; 28 uint32_t regs[ASPEED_WDT_REGS_MAX]; 29 30 uint32_t pclk_freq; 31 uint32_t silicon_rev; 32 uint32_t ext_pulse_width_mask; 33 } AspeedWDTState; 34 35 #endif /* WDT_ASPEED_H */ 36