4 #include "qom/object.h"
6 #define TYPE_NVRAM "nvram"
8 #define NVRAM_CLASS(klass) \
9 OBJECT_CLASS_CHECK(NvramClass, (klass), TYPE_NVRAM)
10 #define NVRAM_GET_CLASS(obj) \
11 OBJECT_GET_CLASS(NvramClass, (obj), TYPE_NVRAM)
13 INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM)
15 typedef struct Nvram Nvram
;
17 typedef struct NvramClass
{
18 InterfaceClass parent
;
20 uint32_t (*read
)(Nvram
*obj
, uint32_t addr
);
21 void (*write
)(Nvram
*obj
, uint32_t addr
, uint32_t val
);
22 void (*toggle_lock
)(Nvram
*obj
, int lock
);
25 Nvram
*m48t59_init_isa(ISABus
*bus
, uint32_t io_base
, uint16_t size
,
26 int base_year
, int type
);
27 Nvram
*m48t59_init(qemu_irq IRQ
, hwaddr mem_base
,
28 uint32_t io_base
, uint16_t size
, int base_year
,
31 #endif /* HW_M48T59_H */