aboutsummaryrefslogtreecommitdiff
path: root/hw/slavio_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/slavio_misc.c')
-rw-r--r--hw/slavio_misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/slavio_misc.c b/hw/slavio_misc.c
index 5dbdd7a208..c8dcd33386 100644
--- a/hw/slavio_misc.c
+++ b/hw/slavio_misc.c
@@ -95,7 +95,7 @@ static void slavio_misc_reset(void *opaque)
s->config = s->aux1 = s->aux2 = s->mctrl = 0;
}
-void slavio_set_power_fail(void *opaque, int power_failing)
+static void slavio_set_power_fail(void *opaque, int irq, int power_failing)
{
MiscState *s = opaque;
@@ -492,6 +492,8 @@ static void slavio_misc_init1(SysBusDevice *dev)
slavio_aux2_mem_write, s);
sysbus_init_mmio(dev, MISC_SIZE, io);
+ qdev_init_gpio_in(&dev->qdev, slavio_set_power_fail, 1);
+
register_savevm("slavio_misc", -1, 1, slavio_misc_save, slavio_misc_load,
s);
qemu_register_reset(slavio_misc_reset, s);