Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133280
b: refs/heads/master
c: 973e5d5
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Feb 27, 2009
1 parent be421fa commit f550c79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: a73090ffaf0f6853880d9ac3fff7e5d88215131a
refs/heads/master: 973e5d525d39be6f9f6c38d37aacf03efda02e60
8 changes: 7 additions & 1 deletion trunk/drivers/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static void sci_poll_put_char(struct uart_port *port, unsigned char c)
} while (!(status & SCxSR_TDxE(port)));

sci_in(port, SCxSR); /* Dummy read */
sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port));
sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port) & ~SCxSR_TEND(port));
sci_out(port, SCxTDR, c);
}
#endif /* CONFIG_CONSOLE_POLL || CONFIG_SERIAL_SH_SCI_CONSOLE */
Expand Down Expand Up @@ -1095,6 +1095,7 @@ static void serial_console_write(struct console *co, const char *s,
unsigned count)
{
struct uart_port *port = &serial_console_port->port;
unsigned short bits;
int i;

for (i = 0; i < count; i++) {
Expand All @@ -1103,6 +1104,11 @@ static void serial_console_write(struct console *co, const char *s,

sci_poll_put_char(port, *s++);
}

/* wait until fifo is empty and last bit has been transmitted */
bits = SCxSR_TDxE(port) | SCxSR_TEND(port);
while ((sci_in(port, SCxSR) & bits) != bits)
cpu_relax();
}

static int __init serial_console_setup(struct console *co, char *options)
Expand Down

0 comments on commit f550c79

Please sign in to comment.