serial: mvebu-uart: add function to change baudrate
Until now, the first UART port baudrate was set by the bootloader. Add a function allowing to change the baudrate. Changes may be done from userspace but also at probe time by the kernel. Use the simplest method: baudrate divisor. Works for all UART ports until 230400 baud. To achieve higher baudrates, software should implement the fractional divisor feature that allows more accuracy for higher rates. Signed-off-by: NAllen Yan <yanwei@marvell.com> [<miquel.raynal@free-electrons.com>: changed termios handling] Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录