diff options
author | Gerald Baeza <gerald.baeza@st.com> | 2017-07-13 15:08:30 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-30 07:32:32 -0700 |
commit | 351a762aa8051960695a0f131731518e93b957fa (patch) | |
tree | 6279043932331bad9e8382d1a4a5c744e5fa23eb /drivers/tty/serial/stm32-usart.h | |
parent | 270e5a74fe4c78a857d65f1a129d3d77a36b8d58 (diff) |
serial: stm32: add fifo support
This patch adds fifo mode support for rx and tx.
A fifo configuration is set in each port structure.
Add has_fifo flag to usart configuration to use fifo only when possible.
Signed-off-by: Gerald Baeza <gerald.baeza@st.com>
Signed-off-by: Bich Hemon <bich.hemon@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/stm32-usart.h')
-rw-r--r-- | drivers/tty/serial/stm32-usart.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h index 5984a66241a9..ffc0c5285e51 100644 --- a/drivers/tty/serial/stm32-usart.h +++ b/drivers/tty/serial/stm32-usart.h @@ -26,6 +26,7 @@ struct stm32_usart_config { u8 uart_enable_bit; /* USART_CR1_UE */ bool has_7bits_data; bool has_wakeup; + bool has_fifo; }; struct stm32_usart_info { @@ -94,6 +95,7 @@ struct stm32_usart_info stm32h7_info = { .uart_enable_bit = 0, .has_7bits_data = true, .has_wakeup = true, + .has_fifo = true, } }; @@ -159,6 +161,7 @@ struct stm32_usart_info stm32h7_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 */ @@ -253,6 +256,7 @@ struct stm32_port { int last_res; bool tx_dma_busy; /* dma tx busy */ bool hw_flow_control; + bool fifoen; int wakeirq; }; |