#include "qemu/osdep.h"
#include "qemu/bitops.h"
#include "qemu/log.h"
+#include "qemu/module.h"
+#include "sysemu/runstate.h"
#include "trace.h"
#include "qapi/error.h"
-#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
+#include "migration/vmstate.h"
#include "hw/registerfields.h"
#include "hw/misc/iotkit-sysctl.h"
+#include "hw/qdev-properties.h"
#include "target/arm/arm-powerctl.h"
#include "target/arm/cpu.h"
s->reset_syndrome = 1;
s->reset_mask = 0;
s->gretreg = 0;
- s->initsvtor0 = 0x10000000;
- s->initsvtor1 = 0x10000000;
- if (s->is_sse200) {
- /*
- * CPU 0 starts on, CPU 1 starts off. In real hardware this is
- * configurable by the SoC integrator as a verilog parameter.
- */
- s->cpuwait = 2;
- } else {
- /* CPU 0 starts on */
- s->cpuwait = 0;
- }
+ s->initsvtor0 = s->initsvtor0_rst;
+ s->initsvtor1 = s->initsvtor1_rst;
+ s->cpuwait = s->cpuwait_rst;
s->wicctrl = 0;
s->scsecctrl = 0;
s->fclk_div = 0;
static Property iotkit_sysctl_props[] = {
DEFINE_PROP_UINT32("SYS_VERSION", IoTKitSysCtl, sys_version, 0),
+ DEFINE_PROP_UINT32("CPUWAIT_RST", IoTKitSysCtl, cpuwait_rst, 0),
+ DEFINE_PROP_UINT32("INITSVTOR0_RST", IoTKitSysCtl, initsvtor0_rst,
+ 0x10000000),
+ DEFINE_PROP_UINT32("INITSVTOR1_RST", IoTKitSysCtl, initsvtor1_rst,
+ 0x10000000),
DEFINE_PROP_END_OF_LIST()
};
dc->vmsd = &iotkit_sysctl_vmstate;
dc->reset = iotkit_sysctl_reset;
- dc->props = iotkit_sysctl_props;
+ device_class_set_props(dc, iotkit_sysctl_props);
dc->realize = iotkit_sysctl_realize;
}