diff options
author | Bernhard Beschow <shentey@gmail.com> | 2023-05-23 21:56:06 +0200 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2023-06-05 07:43:23 +0100 |
commit | 02520772ae1f5e336dd12765d7f9166e859642a9 (patch) | |
tree | f97ee1f96a58b011e0d3d11a0737ee509c4d4b7b /hw/timer/i8254_common.c | |
parent | 848a6caa88b9f082c89c9b41afa975761262981d (diff) |
hw/timer/i8254_common: Share "iobase" property via base class
Both TYPE_KVM_I8254 and TYPE_I8254 have their own but same implementation of
the "iobase" property. The storage for the property already resides in
PITCommonState, so also move the property definition there.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230523195608.125820-2-shentey@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/timer/i8254_common.c')
-rw-r--r-- | hw/timer/i8254_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c index 050875b497..e4093e2904 100644 --- a/hw/timer/i8254_common.c +++ b/hw/timer/i8254_common.c @@ -240,6 +240,11 @@ static const VMStateDescription vmstate_pit_common = { } }; +static Property pit_common_properties[] = { + DEFINE_PROP_UINT32("iobase", PITCommonState, iobase, -1), + DEFINE_PROP_END_OF_LIST(), +}; + static void pit_common_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); @@ -252,6 +257,7 @@ static void pit_common_class_init(ObjectClass *klass, void *data) * done by board code. */ dc->user_creatable = false; + device_class_set_props(dc, pit_common_properties); } static const TypeInfo pit_common_type = { |