]> git.proxmox.com Git - mirror_qemu.git/commitdiff
pckbd: add size qdev property to I8042_MMIO device
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 24 Jun 2022 13:40:39 +0000 (14:40 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 26 Jun 2022 17:40:12 +0000 (18:40 +0100)
This will soon be used to set the size of the register memory region using a
qdev property.

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-25-mark.cave-ayland@ilande.co.uk>

hw/input/pckbd.c
include/hw/input/i8042.h

index c04a2c587e7a1d4653ed43018f9c8e6596ef9c3f..a70442e0f89e1924393d6b896566eb23eb4afde8 100644 (file)
@@ -675,6 +675,7 @@ static void i8042_mmio_reset(DeviceState *dev)
 
 static Property i8042_mmio_properties[] = {
     DEFINE_PROP_UINT64("mask", MMIOKBDState, kbd.mask, UINT64_MAX),
+    DEFINE_PROP_UINT32("size", MMIOKBDState, size, -1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
@@ -696,6 +697,7 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
 
     dev = qdev_new(TYPE_I8042_MMIO);
     qdev_prop_set_uint64(dev, "mask", mask);
+    qdev_prop_set_uint32(dev, "size", size);
     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
     s = &I8042_MMIO(dev)->kbd;
 
index b7df9ace6e98e1f12098d1854548882164dc38ef..ac4098b9571d87cfabe14c5a09ffc2fc1b073776 100644 (file)
@@ -57,6 +57,7 @@ struct MMIOKBDState {
     SysBusDevice parent_obj;
 
     KBDState kbd;
+    uint32_t size;
 };
 
 #define I8042_A20_LINE "a20"