On Mon, May 27, 2019 at 08:59:43PM -0700, jay.dolan@xxxxxxxxxxx wrote: > From: Jay Dolan <jay.dolan@xxxxxxxxxxx> > > The Pericom chips can achieve additional baud rates by programming the > sample clock register. The baud rates can be described as > 921600 * 16 / (16 - scr) for scr values 5 to 15. The divisor is set to 1 > for these baud rates. > > Adds new quirk for Pericom chips other than the four port chips to use > the > > Signed-off-by: Jay Dolan <jay.dolan@xxxxxxxxxxx> > --- > drivers/tty/serial/8250/8250_pci.c | 97 ++++++++++++++++++++++++------ > 1 file changed, 79 insertions(+), 18 deletions(-) > > diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c > index df41397de478..9a895ae449c5 100644 > --- a/drivers/tty/serial/8250/8250_pci.c > +++ b/drivers/tty/serial/8250/8250_pci.c > @@ -1326,13 +1326,66 @@ static int pci_default_setup(struct serial_private *priv, > > return setup_port(priv, port, bar, offset, board->reg_shift); > } > - > +void > +pericom_do_set_divisor(struct uart_port *port, unsigned int baud, > + unsigned int quot, unsigned int quot_frac) > +{ > + int scr; > + int lcr; > + int actual_baud; > + int tolerance; > + > + for (scr = 5 ; scr <= 15 ; scr++) { > + actual_baud = 921600 * 16 / scr; > + tolerance = actual_baud / 50; > + > + if ((baud < actual_baud + tolerance) && > + (baud > actual_baud - tolerance)) { > + > + lcr = serial_port_in(port, UART_LCR); > + serial_port_out(port, UART_LCR, lcr | 0x80); > + > + serial_port_out(port, UART_DLL, 1); > + serial_port_out(port, UART_DLM, 0); > + serial_port_out(port, UART_PCM_SCR, 16 - scr); This line breaks the build :( Are you sure you tested this patch? greg k-h