diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-07 10:47:56 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-07 10:47:56 -0800 |
commit | ea3398a1ae54cd3403f3cc0f6aa498c7452c681a (patch) | |
tree | 19903cfd3eb11f6cdd84f3b6923e604028178150 /drivers/serial/mfd.c | |
parent | 03fa6fc5a68242ddd7cc3ba4255fe6f65b21ce41 (diff) | |
parent | cf7d7e5a1980d1116ee152d25dac382b112b9c17 (diff) | |
download | kernel_samsung_aries-ea3398a1ae54cd3403f3cc0f6aa498c7452c681a.zip kernel_samsung_aries-ea3398a1ae54cd3403f3cc0f6aa498c7452c681a.tar.gz kernel_samsung_aries-ea3398a1ae54cd3403f3cc0f6aa498c7452c681a.tar.bz2 |
Staging: Merge 2.6.37-rc5 into staging-next
This was done to handle a number of conflicts in the batman-adv
and winbond drivers properly. It also now allows us to fix up the sysfs
attributes properly that were not in the .37 release due to them being
only in this tree at the time.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial/mfd.c')
-rw-r--r-- | drivers/serial/mfd.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/serial/mfd.c b/drivers/serial/mfd.c index 5fc699e..d40010a 100644 --- a/drivers/serial/mfd.c +++ b/drivers/serial/mfd.c @@ -900,8 +900,7 @@ serial_hsu_set_termios(struct uart_port *port, struct ktermios *termios, 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: @@ -943,31 +942,24 @@ serial_hsu_set_termios(struct uart_port *port, struct ktermios *termios, baud = uart_get_baud_rate(port, termios, old, 0, 4000000); quot = 1; + ps = 0x10; + mul = 0x3600; switch (baud) { case 3500000: mul = 0x3345; ps = 0xC; break; - case 3000000: - mul = 0x2EE0; - break; - case 2500000: - mul = 0x2710; - break; - case 2000000: - mul = 0x1F40; - break; case 1843200: mul = 0x2400; break; + case 3000000: + case 2500000: + case 2000000: case 1500000: - mul = 0x1770; - break; case 1000000: - mul = 0xFA0; - break; case 500000: - mul = 0x7D0; + /* mul/ps/quot = 0x9C4/0x10/0x1 will make a 500000 bps */ + mul = baud / 500000 * 0x9C4; break; default: /* Use uart_get_divisor to get quot for other baud rates */ |