tty: serial: atmel: Only divide Clock Divisor if the IP is USART
authorSergiu Moga <sergiu.moga@microchip.com>
Thu, 22 Sep 2022 11:33:45 +0000 (14:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Sep 2022 14:31:49 +0000 (16:31 +0200)
commit5644bf1843d915b6fb460fd44f4b9f9ac19a3fbb
treea2a6f9e58dce1a2a1d3f27010dfe26bff0df0e27
parent1a5a01a1e31e6cc3b83a2c843adba743c2f474b9
tty: serial: atmel: Only divide Clock Divisor if the IP is USART

Make sure that the driver only divides the clock divisor if the
IP handled at that point is USART, since UART IP's do not support
implicit peripheral clock division. Instead, in the case of UART,
go with the highest possible clock divisor.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220922113347.144383-8-sergiu.moga@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c