This is a note to let you know that I've just added the patch titled
serial: mfd: adjust the baud rate setting
to the 2.6.36-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
serial-mfd-adjust-the-baud-rate-setting.patch
and it can be found in the queue-2.6.36 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From a5880a9e5bb40fbae55de60051d69a29091053c3 Mon Sep 17 00:00:00 2001
From: Feng Tang <[email protected]>
Date: Fri, 19 Nov 2010 11:01:48 +0800
Subject: serial: mfd: adjust the baud rate setting
From: Feng Tang <[email protected]>
commit a5880a9e5bb40fbae55de60051d69a29091053c3 upstream.
Previous baud rate setting code only has been tested with 3.5M/9600/
115200/230400/460800 bps, and recently we got a 3M bps device to test,
which needs to modify current MUL register setting, and with this
patch 2.5M/2M/1.5M/1M/0.5M should also work as they just use a MUL
value scale down from 3M's.
Also got some reference register setting from silicon guys for
different baud rates, which tries to keep the pre-scalar register value
to 16.
Signed-off-by: Feng Tang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/serial/mfd.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
--- a/drivers/serial/mfd.c
+++ b/drivers/serial/mfd.c
@@ -892,8 +892,7 @@ serial_hsu_set_termios(struct uart_port
unsigned char cval, fcr = 0;
unsigned long flags;
unsigned int baud, quot;
- u32 mul = 0x3600;
- u32 ps = 0x10;
+ u32 ps, mul;
switch (termios->c_cflag & CSIZE) {
case CS5:
@@ -937,20 +936,19 @@ serial_hsu_set_termios(struct uart_port
ps = 0xC;
quot = 1;
break;
- case 2500000:
- mul = 0x2710;
- ps = 0x10;
- quot = 1;
- break;
case 18432000:
mul = 0x2400;
ps = 0x10;
quot = 1;
break;
+ case 3000000:
+ case 2500000:
+ case 2000000:
case 1500000:
- mul = 0x1D4C;
- ps = 0xc;
- quot = 1;
+ case 1000000:
+ case 500000:
+ /* mul/ps/quot = 0x9C4/0x10/0x1 will make a 500000 bps */
+ mul = baud / 500000 * 0x9C4;
break;
default:
;
Patches currently in stable-queue which might be from [email protected] are
queue-2.6.36/serial-mfd-adjust-the-baud-rate-setting.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable