diff options
Diffstat (limited to 'sys/dev/uart/uart_cpu_i386.c')
| -rw-r--r-- | sys/dev/uart/uart_cpu_i386.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/uart/uart_cpu_i386.c b/sys/dev/uart/uart_cpu_i386.c index 30b6e3ae517d..93ca77079459 100644 --- a/sys/dev/uart/uart_cpu_i386.c +++ b/sys/dev/uart/uart_cpu_i386.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Marcel Moolenaar + * Copyright (c) 2003, 2004 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include <dev/uart/uart.h> #include <dev/uart/uart_cpu.h> +bus_space_tag_t uart_bus_space_io = I386_BUS_SPACE_IO; +bus_space_tag_t uart_bus_space_mem = I386_BUS_SPACE_MEM; + int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { @@ -48,6 +51,10 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) { unsigned int i, ivar; + /* Check the environment. */ + if (uart_getenv(devtype, di) == 0) + return (0); + /* * Scan the hints. We only try units 0 to 3 (inclusive). This * covers the ISA legacy where 4 UARTs had their resources @@ -76,7 +83,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) */ di->ops = uart_ns8250_ops; di->bas.chan = 0; - di->bas.bst = I386_BUS_SPACE_IO; + di->bas.bst = uart_bus_space_io; if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) continue; di->bas.regshft = 0; |
