aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/vexpress.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
commitf0d1d2c115dffc1fbaf954d0b449db05c5eb79b1 (patch)
treebbb35206b1f2c3b95dee22169802cb15911869c0 /hw/arm/vexpress.c
parent578c4b2f23debf68a0e081279f91be0e96525824 (diff)
downloadqemu-f0d1d2c115dffc1fbaf954d0b449db05c5eb79b1.zip
qemu-f0d1d2c115dffc1fbaf954d0b449db05c5eb79b1.tar.gz
qemu-f0d1d2c115dffc1fbaf954d0b449db05c5eb79b1.tar.bz2
hw/char: QOM'ify pl011 model
* drop qemu_char_get_next_serial and use chardev prop * add pl011_create wrapper function to create pl011 uart device * change affected board code to use the new way Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Message-id: 1465028065-5855-2-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/vexpress.c')
-rw-r--r--hw/arm/vexpress.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 70b3e70..58760f4 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -39,6 +39,7 @@
#include "sysemu/device_tree.h"
#include "qemu/error-report.h"
#include <libfdt.h>
+#include "hw/char/pl011.h"
#define VEXPRESS_BOARD_ID 0x8e0
#define VEXPRESS_FLASH_SIZE (64 * 1024 * 1024)
@@ -631,10 +632,10 @@ static void vexpress_common_init(MachineState *machine)
sysbus_create_simple("pl050_keyboard", map[VE_KMI0], pic[12]);
sysbus_create_simple("pl050_mouse", map[VE_KMI1], pic[13]);
- sysbus_create_simple("pl011", map[VE_UART0], pic[5]);
- sysbus_create_simple("pl011", map[VE_UART1], pic[6]);
- sysbus_create_simple("pl011", map[VE_UART2], pic[7]);
- sysbus_create_simple("pl011", map[VE_UART3], pic[8]);
+ pl011_create(map[VE_UART0], pic[5], serial_hds[0]);
+ pl011_create(map[VE_UART1], pic[6], serial_hds[1]);
+ pl011_create(map[VE_UART2], pic[7], serial_hds[2]);
+ pl011_create(map[VE_UART3], pic[8], serial_hds[3]);
sysbus_create_simple("sp804", map[VE_TIMER01], pic[2]);
sysbus_create_simple("sp804", map[VE_TIMER23], pic[3]);