[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/92] hw/char/serial-{isa, pci}: Alias QDEV properties from gener
From: |
Paolo Bonzini |
Subject: |
[PULL 24/92] hw/char/serial-{isa, pci}: Alias QDEV properties from generic serial object |
Date: |
Thu, 24 Sep 2020 05:22:06 -0400 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Instead of overwritting the properties of the generic 'state'
object, alias them.
Note we can now propagate the "baudbase" property.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200907015535.827885-7-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/char/serial-isa.c | 4 ++--
hw/char/serial-pci.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index fc8ff7823a..1b8b303079 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -116,8 +116,6 @@ static Property serial_isa_properties[] = {
DEFINE_PROP_UINT32("index", ISASerialState, index, -1),
DEFINE_PROP_UINT32("iobase", ISASerialState, iobase, -1),
DEFINE_PROP_UINT32("irq", ISASerialState, isairq, -1),
- DEFINE_PROP_CHR("chardev", ISASerialState, state.chr),
- DEFINE_PROP_BOOL("wakeup", ISASerialState, state.wakeup, false),
DEFINE_PROP_END_OF_LIST(),
};
@@ -138,6 +136,8 @@ static void serial_isa_initfn(Object *o)
ISASerialState *self = ISA_SERIAL(o);
object_initialize_child(o, "serial", &self->state, TYPE_SERIAL);
+
+ qdev_alias_all_properties(DEVICE(&self->state), o);
}
static const TypeInfo serial_isa_info = {
diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index b0520a5a09..93d6f99244 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -82,7 +82,6 @@ static const VMStateDescription vmstate_pci_serial = {
};
static Property serial_pci_properties[] = {
- DEFINE_PROP_CHR("chardev", PCISerialState, state.chr),
DEFINE_PROP_UINT8("prog_if", PCISerialState, prog_if, 0x02),
DEFINE_PROP_END_OF_LIST(),
};
@@ -107,6 +106,8 @@ static void serial_pci_init(Object *o)
PCISerialState *ps = PCI_SERIAL(o);
object_initialize_child(o, "serial", &ps->state, TYPE_SERIAL);
+
+ qdev_alias_all_properties(DEVICE(&ps->state), o);
}
static const TypeInfo serial_pci_info = {
--
2.26.2
- [PULL 27/92] hw: megasas: consider 'iov_count=0' is an error in megasas_map_sgl, (continued)
- [PULL 27/92] hw: megasas: consider 'iov_count=0' is an error in megasas_map_sgl, Paolo Bonzini, 2020/09/24
- [PULL 18/92] configure: rename QEMU_GA_MSI_ENABLED to CONFIG_QGA_MSI, Paolo Bonzini, 2020/09/24
- [PULL 29/92] meson: move libudev test, Paolo Bonzini, 2020/09/24
- [PULL 31/92] meson: extend libmpathpersist test for static linking, Paolo Bonzini, 2020/09/24
- [PULL 22/92] hw/char/serial: Rename I/O read/write trace events, Paolo Bonzini, 2020/09/24
- [PULL 30/92] meson: move libmpathpersist test, Paolo Bonzini, 2020/09/24
- [PULL 33/92] configure: fix --meson=/path/to/meson, Paolo Bonzini, 2020/09/24
- [PULL 32/92] configure: move malloc_trim/tcmalloc/jemalloc to meson, Paolo Bonzini, 2020/09/24
- [PULL 26/92] hw: megasas: return -1 when 'megasas_map_sgl' fails, Paolo Bonzini, 2020/09/24
- [PULL 35/92] configure: do not limit Hypervisor.framework test to Darwin, Paolo Bonzini, 2020/09/24
- [PULL 24/92] hw/char/serial-{isa, pci}: Alias QDEV properties from generic serial object,
Paolo Bonzini <=
- [PULL 41/92] oslib-posix: default exec_dir to bindir, Paolo Bonzini, 2020/09/24
- [PULL 36/92] meson: qtest: set "depends" correctly, Paolo Bonzini, 2020/09/24
- [PULL 38/92] meson: report accelerator support, Paolo Bonzini, 2020/09/24
- [PULL 37/92] mtest2make: add support for introspected test dependencies, Paolo Bonzini, 2020/09/24
- [PULL 39/92] oslib: do not call g_strdup from qemu_get_exec_dir, Paolo Bonzini, 2020/09/24
- [PULL 46/92] vl: relocate paths to data directories, Paolo Bonzini, 2020/09/24
- [PULL 34/92] configure: move cocoa option to Meson, Paolo Bonzini, 2020/09/24
- [PULL 40/92] fuzz: use qemu_get_exec_dir, Paolo Bonzini, 2020/09/24
- [PULL 42/92] cutils: introduce get_relocated_path, Paolo Bonzini, 2020/09/24
- [PULL 44/92] module: relocate path to modules, Paolo Bonzini, 2020/09/24