1 From a5880a9e5bb40fbae55de60051d69a29091053c3 Mon Sep 17 00:00:00 2001
2 From: Feng Tang <feng.tang@intel.com>
3 Date: Fri, 19 Nov 2010 11:01:48 +0800
4 Subject: serial: mfd: adjust the baud rate setting
6 From: Feng Tang <feng.tang@intel.com>
8 commit a5880a9e5bb40fbae55de60051d69a29091053c3 upstream.
10 Previous baud rate setting code only has been tested with 3.5M/9600/
11 115200/230400/460800 bps, and recently we got a 3M bps device to test,
12 which needs to modify current MUL register setting, and with this
13 patch 2.5M/2M/1.5M/1M/0.5M should also work as they just use a MUL
14 value scale down from 3M's.
16 Also got some reference register setting from silicon guys for
17 different baud rates, which tries to keep the pre-scalar register value
20 Signed-off-by: Feng Tang <feng.tang@intel.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
24 drivers/serial/mfd.c | 18 ++++++++----------
25 1 file changed, 8 insertions(+), 10 deletions(-)
27 --- a/drivers/serial/mfd.c
28 +++ b/drivers/serial/mfd.c
29 @@ -892,8 +892,7 @@ serial_hsu_set_termios(struct uart_port
30 unsigned char cval, fcr = 0;
32 unsigned int baud, quot;
37 switch (termios->c_cflag & CSIZE) {
39 @@ -937,20 +936,19 @@ serial_hsu_set_termios(struct uart_port
62 + /* mul/ps/quot = 0x9C4/0x10/0x1 will make a 500000 bps */
63 + mul = baud / 500000 * 0x9C4;