Skip to content
Commit 5e3ce1f2 authored by Sergiu Moga's avatar Sergiu Moga Committed by Greg Kroah-Hartman
Browse files

tty: serial: atmel: Make the driver aware of the existence of GCLK



Previously, the atmel serial driver did not take into account the
possibility of using the more customizable generic clock as its
baudrate generator. Unless there is a Fractional Part available to
increase accuracy, there is a high chance that we may be able to
generate a baudrate closer to the desired one by using the GCLK as the
clock source. Now, depending on the error rate between
the desired baudrate and the actual baudrate, the serial driver will
fallback on the generic clock. The generic clock must be provided
in the DT node of the serial that may need a more flexible clock source.

Furthermore, define the bit that represents the choice of having GCLK
as a baudrate source clock inside the USCLKS bitmask of the Mode Register
of USART IP's.

Signed-off-by: default avatarSergiu Moga <sergiu.moga@microchip.com>
Link: https://lore.kernel.org/r/20220922113347.144383-9-sergiu.moga@microchip.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5644bf18
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment