• Erwan Le Ray's avatar
    serial: stm32: fix word length configuration · c8a9d043
    Erwan Le Ray authored
    STM32 supports either:
    - 8 and 9 bits word length (including parity bit) for stm32f4 compatible
      devices
    - 7, 8 and 9 bits word length (including parity bit) for stm32f7 and
      stm32h7 compatible devices.
    
    As a consequence STM32 supports the following termios configurations:
    - CS7 with parity bit, and CS8 (with or without parity bit) for stm32f4
      compatible devices.
    - CS6 with parity bit, CS7 and CS8 (with or without parity bit) for
      stm32f7 and stm32h7 compatible devices.
    
    This patch is fixing word length by configuring correctly the SoC with
    supported configurations.
    
    Fixes: ada8618f ("serial: stm32: adding support for stm32f7")
    Signed-off-by: default avatarErwan Le Ray <erwan.leray@st.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    c8a9d043
stm32-usart.c 33.4 KB