xref: /openbmc/qemu/include/hw/watchdog/wdt_diag288.h (revision 6f9ff551)
1 #ifndef WDT_DIAG288_H
2 #define WDT_DIAG288_H
3 
4 #include "hw/qdev-core.h"
5 #include "qom/object.h"
6 
7 #define TYPE_WDT_DIAG288 "diag288"
8 typedef struct DIAG288Class DIAG288Class;
9 typedef struct DIAG288State DIAG288State;
10 DECLARE_OBJ_CHECKERS(DIAG288State, DIAG288Class,
11                      DIAG288, TYPE_WDT_DIAG288)
12 
13 #define WDT_DIAG288_INIT      0
14 #define WDT_DIAG288_CHANGE    1
15 #define WDT_DIAG288_CANCEL    2
16 
17 struct DIAG288State {
18     /*< private >*/
19     DeviceState parent_obj;
20     QEMUTimer *timer;
21     bool enabled;
22 
23     /*< public >*/
24 };
25 
26 struct DIAG288Class {
27     /*< private >*/
28     DeviceClass parent_class;
29 
30     /*< public >*/
31     int (*handle_timer)(DIAG288State *dev,
32                         uint64_t func, uint64_t timeout);
33 };
34 
35 #endif /* WDT_DIAG288_H */
36