diff options
author | ian <ian@FreeBSD.org> | 2016-02-23 03:34:36 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2016-02-23 03:34:36 +0000 |
commit | c87af0103cd3021f25d30f027794d55097a72310 (patch) | |
tree | f10a0c29daad53faca7c52e14916216ed27c9524 | |
parent | bdaa067b0e2468b69fd6ec3ad9149a84035a39ae (diff) | |
download | FreeBSD-src-c87af0103cd3021f25d30f027794d55097a72310.zip FreeBSD-src-c87af0103cd3021f25d30f027794d55097a72310.tar.gz |
Stop using the global fdtbus_bs_tag and instead use the tag from the softc
that was set up properly at init time.
-rw-r--r-- | sys/dev/uart/uart_dev_lpc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/uart/uart_dev_lpc.c b/sys/dev/uart/uart_dev_lpc.c index 9a3e12b..f8d77d4 100644 --- a/sys/dev/uart/uart_dev_lpc.c +++ b/sys/dev/uart/uart_dev_lpc.c @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include <sys/bus.h> #include <sys/conf.h> #include <machine/bus.h> -#include <machine/fdt.h> #include <dev/uart/uart.h> #include <dev/uart/uart_cpu.h> @@ -49,9 +48,9 @@ __FBSDID("$FreeBSD$"); static bus_space_handle_t bsh_clkpwr; #define lpc_ns8250_get_clkreg(_bas, _reg) \ - bus_space_read_4(fdtbus_bs_tag, bsh_clkpwr, (_reg)) + bus_space_read_4((_bas)->bst, bsh_clkpwr, (_reg)) #define lpc_ns8250_set_clkreg(_bas, _reg, _val) \ - bus_space_write_4(fdtbus_bs_tag, bsh_clkpwr, (_reg), (_val)) + bus_space_write_4((_bas)->bst, bsh_clkpwr, (_reg), (_val)) /* * Clear pending interrupts. THRE is cleared by reading IIR. Data @@ -292,7 +291,7 @@ lpc_ns8250_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, u_long clkmode; /* Enable UART clock */ - bus_space_map(fdtbus_bs_tag, LPC_CLKPWR_PHYS_BASE, LPC_CLKPWR_SIZE, 0, + bus_space_map(bas->bst, LPC_CLKPWR_PHYS_BASE, LPC_CLKPWR_SIZE, 0, &bsh_clkpwr); clkmode = lpc_ns8250_get_clkreg(bas, LPC_UART_CLKMODE); lpc_ns8250_set_clkreg(bas, LPC_UART_CLKMODE, clkmode | |