diff options
author | Valentin Caron <valentin.caron@foss.st.com> | 2024-01-12 10:52:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-27 19:04:11 -0800 |
commit | 7be985bd7cd5c6c605ec710e691620b8afb983fd (patch) | |
tree | 0f7849e096c59123b17380fa75dedaa090de5d4a /drivers/tty | |
parent | 7316888fa44f48bd00070290d2eb229f44a55135 (diff) | |
download | linux-7be985bd7cd5c6c605ec710e691620b8afb983fd.tar.gz |
serial: stm32: change register's offset type from u8 to u16
USART has registers above 0xff offset, so extend variable type to u16.
And change UNDEF_REG to 0xffff.
Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Link: https://lore.kernel.org/r/20240112095300.2004878-4-valentin.caron@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/stm32-usart.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h index 5ce1d3aae07e7a..bf3720948704ef 100644 --- a/drivers/tty/serial/stm32-usart.h +++ b/drivers/tty/serial/stm32-usart.h @@ -9,18 +9,18 @@ #define DRIVER_NAME "stm32-usart" struct stm32_usart_offsets { - u8 cr1; - u8 cr2; - u8 cr3; - u8 brr; - u8 gtpr; - u8 rtor; - u8 rqr; - u8 isr; - u8 icr; - u8 rdr; - u8 tdr; - u8 presc; + u16 cr1; + u16 cr2; + u16 cr3; + u16 brr; + u16 gtpr; + u16 rtor; + u16 rqr; + u16 isr; + u16 icr; + u16 rdr; + u16 tdr; + u16 presc; }; struct stm32_usart_config { @@ -37,7 +37,7 @@ struct stm32_usart_info { struct stm32_usart_config cfg; }; -#define UNDEF_REG 0xff +#define UNDEF_REG 0xffff /* USART_SR (F4) / USART_ISR (F7) */ #define USART_SR_PE BIT(0) |