Drop serial-460800.patch
Nobody knows why we're still carrying it. It isn't widely used.
This commit is contained in:
parent
b5b8ababdc
commit
03d9d91f73
@ -551,8 +551,6 @@ Patch09: upstream-reverts.patch
|
||||
Patch450: input-kill-stupid-messages.patch
|
||||
Patch452: no-pcspkr-modalias.patch
|
||||
|
||||
Patch460: serial-460800.patch
|
||||
|
||||
Patch470: die-floppy-die.patch
|
||||
|
||||
Patch500: Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch
|
||||
@ -1300,9 +1298,6 @@ ApplyPatch die-floppy-die.patch
|
||||
|
||||
ApplyPatch no-pcspkr-modalias.patch
|
||||
|
||||
# Allow to use 480600 baud on 16C950 UARTs
|
||||
ApplyPatch serial-460800.patch
|
||||
|
||||
# Silence some useless messages that still get printed with 'quiet'
|
||||
ApplyPatch silence-noise.patch
|
||||
|
||||
|
@ -1,73 +0,0 @@
|
||||
Bugzilla: N/A
|
||||
Upstream-status: Fedora mustard but I have no idea why.
|
||||
|
||||
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
|
||||
index 2209620..659c1bb 100644
|
||||
--- a/drivers/tty/serial/8250/8250_core.c
|
||||
+++ b/drivers/tty/serial/8250/8250_core.c
|
||||
@@ -7,6 +7,9 @@
|
||||
*
|
||||
* Copyright (C) 2001 Russell King.
|
||||
*
|
||||
+ * 2005/09/16: Enabled higher baud rates for 16C95x.
|
||||
+ * (Mathias Adam <a2@adamis.de>)
|
||||
+ *
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -2227,6 +2230,14 @@ static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int
|
||||
else if ((port->flags & UPF_MAGIC_MULTIPLIER) &&
|
||||
baud == (port->uartclk/8))
|
||||
quot = 0x8002;
|
||||
+ /*
|
||||
+ * For 16C950s UART_TCR is used in combination with divisor==1
|
||||
+ * to achieve baud rates up to baud_base*4.
|
||||
+ */
|
||||
+ else if ((port->type == PORT_16C950) &&
|
||||
+ baud > (port->uartclk/16))
|
||||
+ quot = 1;
|
||||
+
|
||||
else
|
||||
quot = uart_get_divisor(port, baud);
|
||||
|
||||
@@ -2240,7 +2251,7 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||
container_of(port, struct uart_8250_port, port);
|
||||
unsigned char cval, fcr = 0;
|
||||
unsigned long flags;
|
||||
- unsigned int baud, quot;
|
||||
+ unsigned int baud, quot, max_baud;
|
||||
int fifo_bug = 0;
|
||||
|
||||
switch (termios->c_cflag & CSIZE) {
|
||||
@@ -2272,9 +2283,10 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||
/*
|
||||
* Ask the core to calculate the divisor for us.
|
||||
*/
|
||||
+ max_baud = (up->port.type == PORT_16C950 ? port->uartclk/4 : port->uartclk/16);
|
||||
baud = uart_get_baud_rate(port, termios, old,
|
||||
port->uartclk / 16 / 0xffff,
|
||||
- port->uartclk / 16);
|
||||
+ max_baud);
|
||||
quot = serial8250_get_divisor(port, baud);
|
||||
|
||||
/*
|
||||
@@ -2311,6 +2323,19 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||
spin_lock_irqsave(&up->port.lock, flags);
|
||||
|
||||
/*
|
||||
+ * 16C950 supports additional prescaler ratios between 1:16 and 1:4
|
||||
+ * thus increasing max baud rate to uartclk/4.
|
||||
+ */
|
||||
+ if (up->port.type == PORT_16C950) {
|
||||
+ if (baud == port->uartclk/4)
|
||||
+ serial_icr_write(up, UART_TCR, 0x4);
|
||||
+ else if (baud == port->uartclk/8)
|
||||
+ serial_icr_write(up, UART_TCR, 0x8);
|
||||
+ else
|
||||
+ serial_icr_write(up, UART_TCR, 0);
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
* Update the per-port timeout.
|
||||
*/
|
||||
uart_update_timeout(port, termios->c_cflag, baud);
|
Loading…
Reference in New Issue
Block a user