From: Valentin Caron <valentin.caron@foss.st.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
<linux-kernel@vger.kernel.org>, <linux-serial@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
Valentin Caron <valentin.caron@foss.st.com>
Subject: [PATCH 3/4] serial: stm32: change register's offset type from u8 to u16
Date: Thu, 11 Jan 2024 16:27:11 +0100 [thread overview]
Message-ID: <20240111152712.1842790-4-valentin.caron@foss.st.com> (raw)
In-Reply-To: <20240111152712.1842790-1-valentin.caron@foss.st.com>
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>
---
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
next prev parent reply other threads:[~2024-01-11 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 15:27 [PATCH 0/4] serial: stm32: improve driver for stm32mp25 Valentin Caron
2024-01-11 15:27 ` [PATCH 1/4] serial: stm32: implement prescaler tuning to compute low baudrate Valentin Caron
2024-01-12 6:57 ` kernel test robot
2024-01-11 15:27 ` [PATCH 2/4] serial: stm32: extend max number of U(S)ART to 9 Valentin Caron
2024-01-11 15:27 ` Valentin Caron [this message]
2024-01-11 15:27 ` [PATCH 4/4] serial: stm32: get FIFO size from hwcfg register Valentin Caron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240111152712.1842790-4-valentin.caron@foss.st.com \
--to=valentin.caron@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®