]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250_pci: rewrite pericom_do_set_divisor()
authorJay Dolan <jay.dolan@accesio.com>
Mon, 22 Nov 2021 12:06:04 +0000 (14:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 17:42:15 +0000 (18:42 +0100)
commit7125014c5146364425c0b68225f9552b5664ffce
tree01fac5c954d90f48a39b7ddb551b9f84d2fec1cf
parent4f80e3aacbaefef6696485cdf50ab2d936f609b3
serial: 8250_pci: rewrite pericom_do_set_divisor()

Have pericom_do_set_divisor() use the uartclk instead of a hard coded
value to work with different speed crystals. Tested with 14.7456 and 24
MHz crystals.

Have pericom_do_set_divisor() always calculate the divisor rather than
call serial8250_do_set_divisor() for rates below baud_base.

Do not write registers or call serial8250_do_set_divisor() if valid
divisors could not be found.

Fixes: 09650c264dcb ("serial: 8250: Add support for higher baud rates to Pericom chips")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Jay Dolan <jay.dolan@accesio.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211122120604.3909-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_pci.c