Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1674740 > unrolled thread
| Started by | Bich HEMON <bich.hemon@st.com> |
|---|---|
| First post | 2017-06-26 15:00 +0200 |
| Last post | 2017-06-26 15:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 01/20] serial: stm32: adding fifo support Bich HEMON <bich.hemon@st.com> - 2017-06-26 15:00 +0200
| From | Bich HEMON <bich.hemon@st.com> |
|---|---|
| Date | 2017-06-26 15:00 +0200 |
| Subject | [PATCH 01/20] serial: stm32: adding fifo support |
| Message-ID | <tWBMu-2tb-21@gated-at.bofh.it> |
From: Bich Hemon <bich.hemon@st.com>
This patch adds fifo mode support for rx and tx.
Signed-off-by: Gerald Baeza <gerald.baeza@st.com>
---
drivers/tty/serial/stm32-usart.c | 3 +++
drivers/tty/serial/stm32-usart.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 0338562..50948f6 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -453,6 +453,7 @@ static int stm32_startup(struct uart_port *port)
return ret;
val = USART_CR1_RXNEIE | USART_CR1_TE | USART_CR1_RE;
+ val |= USART_CR1_FIFOEN;
stm32_set_bits(port, ofs->cr1, val);
return 0;
@@ -467,6 +468,7 @@ static void stm32_shutdown(struct uart_port *port)
val = USART_CR1_TXEIE | USART_CR1_RXNEIE | USART_CR1_TE | USART_CR1_RE;
val |= BIT(cfg->uart_enable_bit);
+ val |= USART_CR1_FIFOEN;
stm32_clr_bits(port, ofs->cr1, val);
free_irq(port->irq, port);
@@ -496,6 +498,7 @@ static void stm32_set_termios(struct uart_port *port, struct ktermios *termios,
cr1 = USART_CR1_TE | USART_CR1_RE | USART_CR1_RXNEIE;
cr1 |= BIT(cfg->uart_enable_bit);
+ cr1 |= USART_CR1_FIFOEN;
cr2 = 0;
cr3 = 0;
diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h
index cd97ceb..9f0d0e8 100644
--- a/drivers/tty/serial/stm32-usart.h
+++ b/drivers/tty/serial/stm32-usart.h
@@ -134,6 +134,7 @@ struct stm32_usart_info stm32f7_info = {
#define USART_CR1_EOBIE BIT(27) /* F7 */
#define USART_CR1_M1 BIT(28) /* F7 */
#define USART_CR1_IE_MASK (GENMASK(8, 4) | BIT(14) | BIT(26) | BIT(27))
+#define USART_CR1_FIFOEN BIT(29) /* H7 */
/* USART_CR2 */
#define USART_CR2_ADD_MASK GENMASK(3, 0) /* F4 */
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web