Change the cadence_uart such that tx/rx is enabled on reset.  Assuming
both are enabled makes debugging early Linux kernel bootup a little bit
easier.

Signed-off-by: Josh Cartwright <josh.cartwri...@ni.com>
---

I've used this patch mostly for my own testing, but it may be of general
use.  On a real system, I would expect the bootloader to leave the uart
in an enabled state, but I'm not using a bootloader for my testing :).

 hw/cadence_uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/cadence_uart.c b/hw/cadence_uart.c
index f8afc4e..2fb21a6 100644
--- a/hw/cadence_uart.c
+++ b/hw/cadence_uart.c
@@ -421,7 +421,7 @@ static const MemoryRegionOps uart_ops = {
 
 static void cadence_uart_reset(UartState *s)
 {
-    s->r[R_CR] = 0x00000128;
+    s->r[R_CR] = UART_CR_RX_EN | UART_CR_TX_EN | UART_CR_STOPBRK;
     s->r[R_IMR] = 0;
     s->r[R_CISR] = 0;
     s->r[R_RTRIG] = 0x00000020;
-- 
1.7.12.4

Reply via email to