diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2024-01-09 13:29:47 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2024-02-13 11:48:53 +0000 |
commit | a9fc9d6d15f006feb6d7ddb036e020d5f9d19fce (patch) | |
tree | 82e7499a8721bf818b69deef850f82543856786d | |
parent | b889b90adb1cb3ba36a769576ee595e6e86dd84b (diff) | |
download | src-a9fc9d6d15f006feb6d7ddb036e020d5f9d19fce.tar.gz src-a9fc9d6d15f006feb6d7ddb036e020d5f9d19fce.zip |
-rw-r--r-- | sys/dev/uart/uart.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/uart/uart.h b/sys/dev/uart/uart.h index 987152283c81..4cdec00c9829 100644 --- a/sys/dev/uart/uart.h +++ b/sys/dev/uart/uart.h @@ -56,6 +56,11 @@ uart_getreg(struct uart_bas *bas, int reg) uint32_t ret; switch (uart_regiowidth(bas)) { +#if !defined(__i386__) + case 8: + ret = bus_space_read_8(bas->bst, bas->bsh, uart_regofs(bas, reg)); + break; +#endif case 4: ret = bus_space_read_4(bas->bst, bas->bsh, uart_regofs(bas, reg)); break; @@ -71,10 +76,15 @@ uart_getreg(struct uart_bas *bas, int reg) } static inline void -uart_setreg(struct uart_bas *bas, int reg, int value) +uart_setreg(struct uart_bas *bas, int reg, uint32_t value) { switch (uart_regiowidth(bas)) { +#if !defined(__i386__) + case 8: + bus_space_write_8(bas->bst, bas->bsh, uart_regofs(bas, reg), value); + break; +#endif case 4: bus_space_write_4(bas->bst, bas->bsh, uart_regofs(bas, reg), value); break; |