From: Valentin Caron Date: Fri, 12 Jan 2024 09:52:59 +0000 (+0100) Subject: serial: stm32: change register's offset type from u8 to u16 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7be985bd7cd5c6c605ec710e691620b8afb983fd;p=linux.git 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 Link: https://lore.kernel.org/r/20240112095300.2004878-4-valentin.caron@foss.st.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h index 5ce1d3aae07e7..bf3720948704e 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)