summaryrefslogtreecommitdiffstats
path: root/sys/mips/nlm/uart_cpu_xlp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/mips/nlm/uart_cpu_xlp.c')
-rw-r--r--sys/mips/nlm/uart_cpu_xlp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/mips/nlm/uart_cpu_xlp.c b/sys/mips/nlm/uart_cpu_xlp.c
index 2e6daf4..1607e91 100644
--- a/sys/mips/nlm/uart_cpu_xlp.c
+++ b/sys/mips/nlm/uart_cpu_xlp.c
@@ -58,15 +58,18 @@ __FBSDID("$FreeBSD$");
#include <mips/nlm/hal/haldefs.h>
#include <mips/nlm/hal/iomap.h>
+#include <mips/nlm/hal/mips-extns.h>
#include <mips/nlm/hal/uart.h>
+#include <mips/nlm/board.h>
+
bus_space_tag_t uart_bus_space_io;
bus_space_tag_t uart_bus_space_mem;
int
uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2)
{
- return ((b1->bsh == b2->bsh && b1->bst == b2->bst) ? 1 : 0);
+ return (b1->bsh == b2->bsh && b1->bst == b2->bst);
}
int
@@ -75,12 +78,12 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
di->ops = uart_getops(&uart_ns8250_class);
di->bas.chan = 0;
di->bas.bst = rmi_uart_bus_space;
- di->bas.bsh = nlm_get_uart_regbase(0, 0);
+ di->bas.bsh = nlm_get_uart_regbase(0, BOARD_CONSOLE_UART);
di->bas.regshft = 2;
/* divisor = rclk / (baudrate * 16); */
- di->bas.rclk = 133000000;
- di->baudrate = 115200;
+ di->bas.rclk = XLP_IO_CLK;
+ di->baudrate = BOARD_CONSOLE_SPEED;
di->databits = 8;
di->stopbits = 1;
di->parity = UART_PARITY_NONE;
OpenPOWER on IntegriCloud