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>
This commit is contained in:
Valentin Caron 2024-01-12 10:52:59 +01:00 committed by Greg Kroah-Hartman
parent 7316888fa4
commit 7be985bd7c

View File

@ -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)