diff --git a/arch/sparc/src/bm3803/bm3803-lowconsole.c b/arch/sparc/src/bm3803/bm3803-lowconsole.c index 4b29dc0d12..b0aaca3279 100644 --- a/arch/sparc/src/bm3803/bm3803-lowconsole.c +++ b/arch/sparc/src/bm3803/bm3803-lowconsole.c @@ -140,7 +140,7 @@ void bm3803_uartconfigure(uintptr_t uart_base, uint32_t baudrate, uart1_flow_ctrl_config(OFF); uart1_loopback_config(OFF); - + BM3803_REG.pio_dir = (BM3803_REG.pio_dir & 0xbfff) | 0x8000; uart1_enable(); } else if (uart_base == BM3803_UART2_BASE) @@ -166,9 +166,35 @@ void bm3803_uartconfigure(uintptr_t uart_base, uint32_t baudrate, uart2_flow_ctrl_config(OFF); uart2_loopback_config(OFF); - + BM3803_REG.pio_dir = (BM3803_REG.pio_dir & 0xfbff) | 0x0800; uart2_enable(); } + else if (uart_base == BM3803_UART3_BASE) + { + /* Select baud. */ + + uart3_set_baudrate(baudrate); + + /* Select parity */ + + if (parity == 1) + { + uart3_parity_config(ODD); /* Odd parity */ + } + else if (parity == 2) + { + uart3_parity_config(EVEN); /* Even parity */ + } + else + { + uart3_parity_config(NONE); /* Even none */ + } + + uart3_flow_ctrl_config(OFF); + uart3_loopback_config(OFF); + + uart3_enable(); + } else { return; @@ -195,7 +221,7 @@ void uart1_configure(void) uart1_flow_ctrl_config(OFF); uart1_loopback_config(OFF); - + BM3803_REG.pio_dir = (BM3803_REG.pio_dir & 0xbfff) | 0x8000; uart1_enable(); } #endif @@ -219,7 +245,7 @@ void uart2_configure(void) uart2_flow_ctrl_config(OFF); uart2_loopback_config(OFF); - + BM3803_REG.pio_dir = (BM3803_REG.pio_dir & 0xfbff) | 0x0800; uart2_enable(); } #endif diff --git a/arch/sparc/src/bm3803/bm3803-serial.c b/arch/sparc/src/bm3803/bm3803-serial.c index b88d83cdd4..e33165dc0f 100644 --- a/arch/sparc/src/bm3803/bm3803-serial.c +++ b/arch/sparc/src/bm3803/bm3803-serial.c @@ -298,15 +298,11 @@ static uart_dev_t g_uart3port = { .recv = { - .head = 0, - .tail = 0, .size = CONFIG_UART3_RXBUFSIZE, .buffer = g_uart3rxbuffer, }, .xmit = { - .head = 0, - .tail = 0, .size = CONFIG_UART3_TXBUFSIZE, .buffer = g_uart3txbuffer, },