From b0014913f2e415abe3434dec7ad7ce20afb491cd Mon Sep 17 00:00:00 2001 From: Julia Suvorova Date: Tue, 30 Oct 2018 15:23:56 +0000 Subject: hw/arm/nrf51_soc: Connect UART to nRF51 SoC Wire up nRF51 UART in the corresponding SoC. Signed-off-by: Julia Suvorova Reviewed-by: Stefan Hajnoczi Reviewed-by: Alistair Francis Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/microbit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/arm/microbit.c') diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c index e7d74116a5..a734e7f650 100644 --- a/hw/arm/microbit.c +++ b/hw/arm/microbit.c @@ -12,6 +12,7 @@ #include "qapi/error.h" #include "hw/boards.h" #include "hw/arm/arm.h" +#include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include "hw/arm/nrf51_soc.h" @@ -35,6 +36,7 @@ static void microbit_init(MachineState *machine) sysbus_init_child_obj(OBJECT(machine), "nrf51", soc, sizeof(s->nrf51), TYPE_NRF51_SOC); + qdev_prop_set_chr(DEVICE(&s->nrf51), "serial0", serial_hd(0)); object_property_set_link(soc, OBJECT(system_memory), "memory", &error_fatal); object_property_set_bool(soc, true, "realized", &error_fatal); -- cgit v1.2.3-55-g7522