summary refs log tree commit diff stats
path: root/hw/char
diff options
context:
space:
mode:
authorPrasad J Pandit <pjp@fedoraproject.org>2016-10-28 14:12:31 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-10-28 15:51:27 +0100
commitd1df5cf3634af7003951d23164f349e360ecb601 (patch)
treea2524688bd701d2688b86c578729c94955a0d684 /hw/char
parent5c8c2aafcf02986a998cf71aa47692fff176ad69 (diff)
downloadfocaccia-qemu-d1df5cf3634af7003951d23164f349e360ecb601.tar.gz
focaccia-qemu-d1df5cf3634af7003951d23164f349e360ecb601.zip
char: cadence: correct reset value for baud rate registers
The Cadence UART device emulator stores 'baud rate generator'
and 'baud rate divider' values, used in computing speed, in two
registers. The device specification defines their range and
their reset value. Use their correct value when resetting the
device in cadence_uart_reset.

Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-id: 1477378140-2670-1-git-send-email-ppandit@redhat.com
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/cadence_uart.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c
index c2b9154305..def34cd0d2 100644
--- a/hw/char/cadence_uart.c
+++ b/hw/char/cadence_uart.c
@@ -450,7 +450,8 @@ static void cadence_uart_reset(DeviceState *dev)
     s->r[R_IMR] = 0;
     s->r[R_CISR] = 0;
     s->r[R_RTRIG] = 0x00000020;
-    s->r[R_BRGR] = 0x0000000F;
+    s->r[R_BRGR] = 0x0000028B;
+    s->r[R_BDIV] = 0x0000000F;
     s->r[R_TTRIG] = 0x00000020;
 
     uart_rx_reset(s);