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