[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 51/55] pckbd: add i8042_reset() function to I8042 device
From: |
Mark Cave-Ayland |
Subject: |
[PULL 51/55] pckbd: add i8042_reset() function to I8042 device |
Date: |
Sun, 26 Jun 2022 18:45:27 +0100 |
This means that it is no longer necessary to call qemu_register_reset() manually
within i8042_realizefn().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220624134109.881989-52-mark.cave-ayland@ilande.co.uk>
---
hw/input/pckbd.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index ee306428a3..ff76c0636d 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -808,6 +808,14 @@ static const MemoryRegionOps i8042_cmd_ops = {
.endianness = DEVICE_LITTLE_ENDIAN,
};
+static void i8042_reset(DeviceState *dev)
+{
+ ISAKBDState *s = I8042(dev);
+ KBDState *ks = &s->kbd;
+
+ kbd_reset(ks);
+}
+
static void i8042_initfn(Object *obj)
{
ISAKBDState *isa_s = I8042(obj);
@@ -854,7 +862,6 @@ static void i8042_realizefn(DeviceState *dev, Error **errp)
s->throttle_timer = timer_new_us(QEMU_CLOCK_VIRTUAL,
kbd_throttle_timeout, s);
}
- qemu_register_reset(kbd_reset, s);
}
static void i8042_build_aml(AcpiDevAmlIf *adev, Aml *scope)
@@ -900,6 +907,7 @@ static void i8042_class_initfn(ObjectClass *klass, void
*data)
AcpiDevAmlIfClass *adevc = ACPI_DEV_AML_IF_CLASS(klass);
device_class_set_props(dc, i8042_properties);
+ dc->reset = i8042_reset;
dc->realize = i8042_realizefn;
dc->vmsd = &vmstate_kbd_isa;
adevc->build_dev_aml = i8042_build_aml;
--
2.30.2
- [PULL 41/55] lasips2: implement lasips2_init() function, (continued)
- [PULL 41/55] lasips2: implement lasips2_init() function, Mark Cave-Ayland, 2022/06/26
- [PULL 42/55] lasips2: move mapping of LASIPS2 registers to HPPA machine, Mark Cave-Ayland, 2022/06/26
- [PULL 44/55] lasips2: add base property, Mark Cave-Ayland, 2022/06/26
- [PULL 43/55] lasips2: move initialisation of PS2 ports from lasi_initfn() to lasi_init(), Mark Cave-Ayland, 2022/06/26
- [PULL 45/55] lasips2: implement lasips2_realize(), Mark Cave-Ayland, 2022/06/26
- [PULL 46/55] lasips2: use sysbus IRQ for output IRQ, Mark Cave-Ayland, 2022/06/26
- [PULL 47/55] lasips2: switch over from update_irq() function to PS2 device gpio, Mark Cave-Ayland, 2022/06/26
- [PULL 48/55] lasips2: add QEMU interface comment, Mark Cave-Ayland, 2022/06/26
- [PULL 49/55] pckbd: switch I8042_MMIO device from update_irq() function to PS2 device gpio, Mark Cave-Ayland, 2022/06/26
- [PULL 50/55] pckbd: add QEMU interface comment for I8042_MMIO device, Mark Cave-Ayland, 2022/06/26
- [PULL 51/55] pckbd: add i8042_reset() function to I8042 device,
Mark Cave-Ayland <=
- [PULL 55/55] artist: set memory region owners for buffers to the artist device, Mark Cave-Ayland, 2022/06/26
- [PULL 53/55] pckbd: add QEMU interface comment for I8042 device, Mark Cave-Ayland, 2022/06/26
- [PULL 54/55] ps2: remove update_irq() function and update_arg parameter, Mark Cave-Ayland, 2022/06/26
- [PULL 52/55] pckbd: switch I8042 device from update_irq() function to PS2 device gpio, Mark Cave-Ayland, 2022/06/26
- Re: [PULL 00/55] qemu-sparc queue 20220626, Richard Henderson, 2022/06/27