Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185177
b: refs/heads/master
c: 8fe2d54
h: refs/heads/master
i:
  185175: 0289ced
v: v3
  • Loading branch information
Albin Tonnerre authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 3fcc600 commit 3c68d62
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b505ca8e2600eb9e7dd2d6b2682a81717671374
refs/heads/master: 8fe2d54145a51238308d333f9dc57c5df575ff78
22 changes: 22 additions & 0 deletions trunk/drivers/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,24 @@ static int atmel_verify_port(struct uart_port *port, struct serial_struct *ser)
return ret;
}

#ifdef CONFIG_CONSOLE_POLL
static int atmel_poll_get_char(struct uart_port *port)
{
while (!(UART_GET_CSR(port) & ATMEL_US_RXRDY))
cpu_relax();

return UART_GET_CHAR(port);
}

static void atmel_poll_put_char(struct uart_port *port, unsigned char ch)
{
while (!(UART_GET_CSR(port) & ATMEL_US_TXRDY))
cpu_relax();

UART_PUT_CHAR(port, ch);
}
#endif

static struct uart_ops atmel_pops = {
.tx_empty = atmel_tx_empty,
.set_mctrl = atmel_set_mctrl,
Expand All @@ -1232,6 +1250,10 @@ static struct uart_ops atmel_pops = {
.config_port = atmel_config_port,
.verify_port = atmel_verify_port,
.pm = atmel_serial_pm,
#ifdef CONFIG_CONSOLE_POLL
.poll_get_char = atmel_poll_get_char,
.poll_put_char = atmel_poll_put_char,
#endif
};

/*
Expand Down

0 comments on commit 3c68d62

Please sign in to comment.