2016-06-29 10:12:57 +02:00
|
|
|
#ifndef HW_M48T59_H
|
|
|
|
#define HW_M48T59_H
|
2007-11-17 18:14:51 +01:00
|
|
|
|
2015-03-02 23:23:27 +01:00
|
|
|
#include "qemu-common.h"
|
|
|
|
#include "qom/object.h"
|
|
|
|
|
|
|
|
#define TYPE_NVRAM "nvram"
|
|
|
|
|
|
|
|
#define NVRAM_CLASS(klass) \
|
|
|
|
OBJECT_CLASS_CHECK(NvramClass, (klass), TYPE_NVRAM)
|
|
|
|
#define NVRAM_GET_CLASS(obj) \
|
|
|
|
OBJECT_GET_CLASS(NvramClass, (obj), TYPE_NVRAM)
|
|
|
|
#define NVRAM(obj) \
|
|
|
|
INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM)
|
|
|
|
|
2018-12-04 15:20:06 +01:00
|
|
|
typedef struct Nvram Nvram;
|
2015-03-02 23:23:27 +01:00
|
|
|
|
|
|
|
typedef struct NvramClass {
|
|
|
|
InterfaceClass parent;
|
|
|
|
|
|
|
|
uint32_t (*read)(Nvram *obj, uint32_t addr);
|
|
|
|
void (*write)(Nvram *obj, uint32_t addr, uint32_t val);
|
|
|
|
void (*toggle_lock)(Nvram *obj, int lock);
|
|
|
|
} NvramClass;
|
|
|
|
|
2015-03-02 23:23:27 +01:00
|
|
|
Nvram *m48t59_init_isa(ISABus *bus, uint32_t io_base, uint16_t size,
|
2015-03-02 23:23:27 +01:00
|
|
|
int base_year, int type);
|
2015-03-02 23:23:27 +01:00
|
|
|
Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base,
|
2015-03-02 23:23:27 +01:00
|
|
|
uint32_t io_base, uint16_t size, int base_year,
|
|
|
|
int type);
|
2015-03-02 23:23:27 +01:00
|
|
|
|
2016-06-29 10:12:57 +02:00
|
|
|
#endif /* HW_M48T59_H */
|