diff options
-rw-r--r-- | sys/dev/uart/uart_cpu_alpha.c | 6 | ||||
-rw-r--r-- | sys/dev/uart/uart_cpu_amd64.c | 3 | ||||
-rw-r--r-- | sys/dev/uart/uart_cpu_i386.c | 3 | ||||
-rw-r--r-- | sys/dev/uart/uart_cpu_ia64.c | 11 | ||||
-rw-r--r-- | sys/dev/uart/uart_cpu_pc98.c | 3 |
5 files changed, 17 insertions, 9 deletions
diff --git a/sys/dev/uart/uart_cpu_alpha.c b/sys/dev/uart/uart_cpu_alpha.c index 8638277..40d2bf1 100644 --- a/sys/dev/uart/uart_cpu_alpha.c +++ b/sys/dev/uart/uart_cpu_alpha.c @@ -66,7 +66,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) boothowto |= RB_SERIAL; di->ops = uart_ns8250_ops; di->bas.bst = busspace_isa_io; - di->bas.bsh = 0x3f8; + if (bus_space_map(di->bas.bst, 0x3f8, 8, 0, &di->bas.bsh) != 0) + return (ENXIO); di->bas.regshft = 0; di->bas.rclk = 0; di->baudrate = 9600; @@ -102,7 +103,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) */ di->ops = uart_ns8250_ops; di->bas.bst = busspace_isa_io; - di->bas.bsh = ivar; + if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) + return (ENXIO); di->bas.regshft = 0; di->bas.rclk = 0; if (resource_int_value("uart", i, "baud", &ivar) != 0) diff --git a/sys/dev/uart/uart_cpu_amd64.c b/sys/dev/uart/uart_cpu_amd64.c index 1852d40..d52e3bc 100644 --- a/sys/dev/uart/uart_cpu_amd64.c +++ b/sys/dev/uart/uart_cpu_amd64.c @@ -83,7 +83,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) */ di->ops = uart_ns8250_ops; di->bas.bst = AMD64_BUS_SPACE_IO; - di->bas.bsh = ivar; + if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) + return (ENXIO); di->bas.regshft = 0; di->bas.rclk = 0; if (resource_int_value("uart", i, "baud", &ivar) != 0) diff --git a/sys/dev/uart/uart_cpu_i386.c b/sys/dev/uart/uart_cpu_i386.c index 9e34290..da25405 100644 --- a/sys/dev/uart/uart_cpu_i386.c +++ b/sys/dev/uart/uart_cpu_i386.c @@ -83,7 +83,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) */ di->ops = uart_ns8250_ops; di->bas.bst = I386_BUS_SPACE_IO; - di->bas.bsh = ivar; + if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) + return (ENXIO); di->bas.regshft = 0; di->bas.rclk = 0; if (resource_int_value("uart", i, "baud", &ivar) != 0) diff --git a/sys/dev/uart/uart_cpu_ia64.c b/sys/dev/uart/uart_cpu_ia64.c index 32073fc..9340ae5 100644 --- a/sys/dev/uart/uart_cpu_ia64.c +++ b/sys/dev/uart/uart_cpu_ia64.c @@ -85,9 +85,11 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) di->bas.bst = IA64_BUS_SPACE_IO; di->bas.bst = (ent->address.addr_space == 0) ? IA64_BUS_SPACE_MEM : IA64_BUS_SPACE_IO; - di->bas.bsh = ent->address.addr_high; - di->bas.bsh = (di->bas.bsh << 32) + - ent->address.addr_low; + if (bus_space_map(di->bas.bst, + (ent->address.addr_high << 32) + + ent->address.addr_low, + 8, 0, &di->bas.bsh) != 0) + return (ENXIO); di->bas.regshft = 0; di->bas.rclk = ent->pclock << 4; /* We don't deal with 64-bit baud rates. */ @@ -130,7 +132,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) */ di->ops = uart_ns8250_ops; di->bas.bst = IA64_BUS_SPACE_IO; - di->bas.bsh = ivar; + if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) + return (ENXIO); di->bas.regshft = 0; di->bas.rclk = 0; if (resource_int_value("uart", i, "baud", &ivar) != 0) diff --git a/sys/dev/uart/uart_cpu_pc98.c b/sys/dev/uart/uart_cpu_pc98.c index 66a035c..cb10806 100644 --- a/sys/dev/uart/uart_cpu_pc98.c +++ b/sys/dev/uart/uart_cpu_pc98.c @@ -88,7 +88,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) else di->ops = uart_i8251_ops; di->bas.bst = I386_BUS_SPACE_IO; - i386_bus_space_handle_alloc(di->bas.bst, ivar, 8, &di->bas.bsh); + if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) + return (ENXIO); di->bas.regshft = 0; di->bas.rclk = 0; if (resource_int_value("uart", i, "baud", &ivar) != 0) |