Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b857ff86 authored by Pali Rohár's avatar Pali Rohár Committed by Greg Kroah-Hartman
Browse files

serial: mvebu-uart: correctly calculate minimal possible baudrate



[ Upstream commit deeaf963569a0d9d1b08babb771f61bb501a5704 ]

For default (x16) scheme which is currently used by mvebu-uart.c driver,
maximal divisor of UART base clock is 1023*16. Therefore there is limit for
minimal supported baudrate. This change calculate it correctly and prevents
setting invalid divisor 0 into hardware registers.

Signed-off-by: default avatarPali Rohár <pali@kernel.org>
Fixes: 68a0db1d ("serial: mvebu-uart: add function to change baudrate")
Link: https://lore.kernel.org/r/20210624224909.6350-4-pali@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7900c981
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