monitor: Fix tracepoint crash on JSON syntax error
[qemu/armbru.git] / include / hw / timer / m48t59.h
blobdb5e43a8daac88b0c6671556343f72fe359093f3
1 #ifndef HW_M48T59_H
2 #define HW_M48T59_H
4 #include "qemu-common.h"
5 #include "qom/object.h"
7 #define TYPE_NVRAM "nvram"
9 #define NVRAM_CLASS(klass) \
10 OBJECT_CLASS_CHECK(NvramClass, (klass), TYPE_NVRAM)
11 #define NVRAM_GET_CLASS(obj) \
12 OBJECT_GET_CLASS(NvramClass, (obj), TYPE_NVRAM)
13 #define NVRAM(obj) \
14 INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM)
16 typedef struct Nvram {
17 Object parent;
18 } Nvram;
20 typedef struct NvramClass {
21 InterfaceClass parent;
23 uint32_t (*read)(Nvram *obj, uint32_t addr);
24 void (*write)(Nvram *obj, uint32_t addr, uint32_t val);
25 void (*toggle_lock)(Nvram *obj, int lock);
26 } NvramClass;
28 Nvram *m48t59_init_isa(ISABus *bus, uint32_t io_base, uint16_t size,
29 int base_year, int type);
30 Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base,
31 uint32_t io_base, uint16_t size, int base_year,
32 int type);
34 #endif /* HW_M48T59_H */