Stop using the global fdtbus_bs_tag and instead use the tag from the softc
that was set up properly at init time.
This commit is contained in:
parent
b1c2e02c10
commit
3f817dd216
@ -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 |
|
||||
|
Loading…
Reference in New Issue
Block a user