aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/digic.c
diff options
context:
space:
mode:
authorxiaoqiang zhao <zxq_yx_007@163.com>2016-06-06 16:59:31 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-06 16:59:31 +0100
commit746c3b3eba0d091d2e2d84b63ce4ca3186e212a7 (patch)
tree7d8414208f4ccded39d7b7cb7393810fcdde3ff9 /hw/arm/digic.c
parent4be12ea09acc32f7e1b9d11e9f34969c7ae603ee (diff)
hw/char: QOM'ify digic-uart model
* drop qemu_char_get_next_serial and use chardev prop * change affected board code to use the new way Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Message-id: 1465028065-5855-4-git-send-email-zxq_yx_007@163.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/digic.c')
-rw-r--r--hw/arm/digic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/arm/digic.c b/hw/arm/digic.c
index e0f9730325..d60ea395f4 100644
--- a/hw/arm/digic.c
+++ b/hw/arm/digic.c
@@ -23,6 +23,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/arm/digic.h"
+#include "sysemu/sysemu.h"
#define DIGIC4_TIMER_BASE(n) (0xc0210000 + (n) * 0x100)
@@ -84,6 +85,7 @@ static void digic_realize(DeviceState *dev, Error **errp)
sysbus_mmio_map(sbd, 0, DIGIC4_TIMER_BASE(i));
}
+ qdev_prop_set_chr(DEVICE(&s->uart), "chardev", serial_hds[0]);
object_property_set_bool(OBJECT(&s->uart), true, "realized", &err);
if (err != NULL) {
error_propagate(errp, err);