diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2017-09-27 15:44:51 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-10-08 16:19:56 -0400 |
commit | 2a7ecc536019066f77ff7b6e24cb3194ee0f65c0 (patch) | |
tree | db56364189fb5b9e7922ce677f75642162b47121 /drivers/serial/serial_stm32x7.c | |
parent | 60a996bacb74052f7e3966a875dfdebee036d446 (diff) |
serial: stm32x7: add fifo support for STM32H7
Add fifo mode support for rx and tx.
As only STM32H7 supports this feature, add has_fifo flag
to uart configuration to use fifo only when possible.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'drivers/serial/serial_stm32x7.c')
-rw-r--r-- | drivers/serial/serial_stm32x7.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/serial/serial_stm32x7.c b/drivers/serial/serial_stm32x7.c index 81a230860d..19697e31e7 100644 --- a/drivers/serial/serial_stm32x7.c +++ b/drivers/serial/serial_stm32x7.c @@ -117,6 +117,8 @@ static int stm32_serial_probe(struct udevice *dev) BIT(uart_enable_bit)); if (plat->uart_info->has_overrun_disable) setbits_le32(base + CR3_OFFSET(stm32f4), USART_CR3_OVRDIS); + if (plat->uart_info->has_fifo) + setbits_le32(base + CR1_OFFSET(stm32f4), USART_CR1_FIFOEN); setbits_le32(base + CR1_OFFSET(stm32f4), USART_CR1_RE | USART_CR1_TE | BIT(uart_enable_bit)); @@ -125,8 +127,8 @@ static int stm32_serial_probe(struct udevice *dev) #if CONFIG_IS_ENABLED(OF_CONTROL) static const struct udevice_id stm32_serial_id[] = { - { .compatible = "st,stm32f7-uart", .data = (ulong)&stm32x7_info}, - { .compatible = "st,stm32h7-uart", .data = (ulong)&stm32x7_info}, + { .compatible = "st,stm32f7-uart", .data = (ulong)&stm32f7_info}, + { .compatible = "st,stm32h7-uart", .data = (ulong)&stm32h7_info}, {} }; |