提交 0284dc54 编写于 作者: B Blue Swirl

sparc32: convert eccmemctl to reset + vmsd

Also remove unused include directive.
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 1c6a50e7
......@@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
#include "sun4m.h"
#include "sysbus.h"
//#define DEBUG_ECC
......@@ -276,9 +275,9 @@ static const VMStateDescription vmstate_ecc = {
}
};
static void ecc_reset(void *opaque)
static void ecc_reset(DeviceState *d)
{
ECCState *s = opaque;
ECCState *s = container_of(d, ECCState, busdev.qdev);
if (s->version == ECC_MCC)
s->regs[ECC_MER] &= ECC_MER_REU;
......@@ -310,9 +309,8 @@ static int ecc_init1(SysBusDevice *dev)
ecc_diag_mem_write, s);
sysbus_init_mmio(dev, ECC_DIAG_SIZE, ecc_io_memory);
}
vmstate_register(-1, &vmstate_ecc, s);
qemu_register_reset(ecc_reset, s);
ecc_reset(s);
ecc_reset(&s->busdev.qdev);
return 0;
}
......@@ -320,6 +318,8 @@ static SysBusDeviceInfo ecc_info = {
.init = ecc_init1,
.qdev.name = "eccmemctl",
.qdev.size = sizeof(ECCState),
.qdev.vmsd = &vmstate_ecc,
.qdev.reset = ecc_reset,
.qdev.props = (Property[]) {
DEFINE_PROP_HEX32("version", ECCState, version, -1),
DEFINE_PROP_END_OF_LIST(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册