[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240112095300.2004878-4-valentin.caron@foss.st.com>
Date: Fri, 12 Jan 2024 10:52:59 +0100
From: Valentin Caron <valentin.caron@...s.st.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby
<jirislaby@...nel.org>
CC: Alexandre Torgue <alexandre.torgue@...s.st.com>,
<linux-kernel@...r.kernel.org>, <linux-serial@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>,
Valentin Caron
<valentin.caron@...s.st.com>
Subject: [PATCH v2 3/4] 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@...s.st.com>
---
drivers/tty/serial/stm32-usart.h | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h
index 5ce1d3aae07e..bf3720948704 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)
--
2.25.1
Powered by blists - more mailing lists