[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/11] hw/timer/etraxfs: Convert reset handler to DeviceReset
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 10/11] hw/timer/etraxfs: Convert reset handler to DeviceReset |
Date: |
Thu, 26 Sep 2019 17:17:32 +0200 |
Convert the reset handler into a proper Device reset method.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/timer/etraxfs_timer.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c
index d62025b879..c2623ecd59 100644
--- a/hw/timer/etraxfs_timer.c
+++ b/hw/timer/etraxfs_timer.c
@@ -24,7 +24,6 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
-#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
@@ -307,9 +306,9 @@ static const MemoryRegionOps timer_ops = {
}
};
-static void etraxfs_timer_reset(void *opaque)
+static void etraxfs_timer_reset(DeviceState *dev)
{
- ETRAXTimerState *t = opaque;
+ ETRAXTimerState *t = ETRAX_TIMER(dev);
ptimer_stop(t->ptimer_t0);
ptimer_stop(t->ptimer_t1);
@@ -338,13 +337,13 @@ static void etraxfs_timer_realize(DeviceState *dev, Error
**errp)
memory_region_init_io(&t->mmio, OBJECT(t), &timer_ops, t,
"etraxfs-timer", 0x5c);
sysbus_init_mmio(sbd, &t->mmio);
- qemu_register_reset(etraxfs_timer_reset, t);
}
static void etraxfs_timer_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ dc->reset = etraxfs_timer_reset;
dc->realize = etraxfs_timer_realize;
}
--
2.20.1
- [PATCH 02/11] hw/ide/piix: Convert reset handler to DeviceReset, (continued)
- [PATCH 02/11] hw/ide/piix: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 03/11] hw/isa/piix4: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 04/11] hw/pci-host/piix: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 05/11] hw/ide/sii3112: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 07/11] hw/isa/vt82c686: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 06/11] hw/ide/via82c: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 09/11] hw/pci-host/bonito: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 08/11] hw/input/lm832x: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 11/11] hw/misc/vmcoreinfo: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 10/11] hw/timer/etraxfs: Convert reset handler to DeviceReset,
Philippe Mathieu-Daudé <=
- Re: [PATCH 00/11] hw: Convert various reset() handler to DeviceReset, no-reply, 2019/09/27