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)
14 INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM)
16 typedef struct 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
);
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
,
34 #endif /* HW_M48T59_H */