Changeset View
Changeset View
Standalone View
Standalone View
stable/11/sys/dev/uart/uart.h
Show All 35 Lines | |||||
* other timing related computations. | * other timing related computations. | ||||
*/ | */ | ||||
struct uart_bas { | struct uart_bas { | ||||
bus_space_tag_t bst; | bus_space_tag_t bst; | ||||
bus_space_handle_t bsh; | bus_space_handle_t bsh; | ||||
u_int chan; | u_int chan; | ||||
u_int rclk; | u_int rclk; | ||||
u_int regshft; | u_int regshft; | ||||
u_int regiowidth; | |||||
u_int busy_detect; | |||||
}; | }; | ||||
#define uart_regofs(bas, reg) ((reg) << (bas)->regshft) | #define uart_regofs(bas, reg) ((reg) << (bas)->regshft) | ||||
#define uart_regiowidth(bas) ((bas)->regiowidth) | |||||
#define uart_getreg(bas, reg) \ | #define uart_getreg(bas, reg) \ | ||||
bus_space_read_1((bas)->bst, (bas)->bsh, uart_regofs(bas, reg)) | bus_space_read_1((bas)->bst, (bas)->bsh, uart_regofs(bas, reg)) | ||||
#define uart_setreg(bas, reg, value) \ | #define uart_setreg(bas, reg, value) \ | ||||
bus_space_write_1((bas)->bst, (bas)->bsh, uart_regofs(bas, reg), value) | bus_space_write_1((bas)->bst, (bas)->bsh, uart_regofs(bas, reg), value) | ||||
/* | /* | ||||
* XXX we don't know the length of the bus space address range in use by | * XXX we don't know the length of the bus space address range in use by | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |