Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338430
b: refs/heads/master
c: 9d482cc
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Yoshii authored and Greg Kroah-Hartman committed Nov 16, 2012
1 parent 993fc0d commit d2ada8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 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: 4ffc3cdb642823ebee84538addac7cde1174e314
refs/heads/master: 9d482cc353bd0391730730b26e4c2938dc90e477
19 changes: 8 additions & 11 deletions trunk/drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
{
struct sci_port *s = to_sci_port(port);
struct plat_sci_reg *reg;
unsigned int baud, smr_val, max_baud;
unsigned int baud, smr_val, max_baud, cks;
int t = -1;

/*
Expand Down Expand Up @@ -1849,21 +1849,18 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,

uart_update_timeout(port, termios->c_cflag, baud);

serial_port_out(port, SCSMR, smr_val);
for (cks = 0; t >= 256 && cks <= 3; cks++)
t >>= 2;

dev_dbg(port->dev, "%s: SMR %x, t %x, SCSCR %x\n", __func__, smr_val, t,
s->cfg->scscr);
dev_dbg(port->dev, "%s: SMR %x, cks %x, t %x, SCSCR %x\n",
__func__, smr_val, cks, t, s->cfg->scscr);

if (t >= 0) {
if (t >= 256) {
serial_port_out(port, SCSMR, (serial_port_in(port, SCSMR) & ~3) | 1);
t >>= 2;
} else
serial_port_out(port, SCSMR, serial_port_in(port, SCSMR) & ~3);

serial_port_out(port, SCSMR, (smr_val & ~3) | cks);
serial_port_out(port, SCBRR, t);
udelay((1000000+(baud-1)) / baud); /* Wait one bit interval */
}
} else
serial_port_out(port, SCSMR, smr_val);

sci_init_pins(port, termios->c_cflag);

Expand Down

0 comments on commit d2ada8a

Please sign in to comment.