Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199848
b: refs/heads/master
c: fadf34f
h: refs/heads/master
v: v3
  • Loading branch information
Tobias Klauser authored and Greg Kroah-Hartman committed Jun 4, 2010
1 parent 9d081eb commit 6b124d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 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: d8d721f4c005f9a69bd1b5d5c6ba99b7e1d464de
refs/heads/master: fadf34f0f05ca5ea02ffcd89544cd372bbdb739b
23 changes: 8 additions & 15 deletions trunk/drivers/serial/altera_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,31 +391,24 @@ int __init early_altera_uart_setup(struct altera_uart_platform_uart *platp)
return 0;
}

static void altera_uart_console_putc(struct console *co, const char c)
static void altera_uart_console_putc(struct uart_port *port, const char c)
{
struct uart_port *port = &(altera_uart_ports + co->index)->port;
int i;
while (!(readl(port->membase + ALTERA_UART_STATUS_REG) &
ALTERA_UART_STATUS_TRDY_MSK))
cpu_relax();

for (i = 0; i < 0x10000; i++) {
if (readl(port->membase + ALTERA_UART_STATUS_REG) &
ALTERA_UART_STATUS_TRDY_MSK)
break;
}
writel(c, port->membase + ALTERA_UART_TXDATA_REG);
for (i = 0; i < 0x10000; i++) {
if (readl(port->membase + ALTERA_UART_STATUS_REG) &
ALTERA_UART_STATUS_TRDY_MSK)
break;
}
}

static void altera_uart_console_write(struct console *co, const char *s,
unsigned int count)
{
struct uart_port *port = &(altera_uart_ports + co->index)->port;

for (; count; count--, s++) {
altera_uart_console_putc(co, *s);
altera_uart_console_putc(port, *s);
if (*s == '\n')
altera_uart_console_putc(co, '\r');
altera_uart_console_putc(port, '\r');
}
}

Expand Down

0 comments on commit 6b124d3

Please sign in to comment.