Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222828
b: refs/heads/master
c: a5880a9
h: refs/heads/master
v: v3
  • Loading branch information
Feng Tang authored and Greg Kroah-Hartman committed Dec 1, 2010
1 parent 4854829 commit 212e4a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: acfa747baf73922021a047f2d87a2d866f5dbab5
refs/heads/master: a5880a9e5bb40fbae55de60051d69a29091053c3
24 changes: 8 additions & 16 deletions trunk/drivers/serial/mfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 212e4a8

Please sign in to comment.