Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213482
b: refs/heads/master
c: 8a28af7
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent a77ed3d commit 9e5715b
Show file tree
Hide file tree
Showing 2 changed files with 26 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: a95898114059e1038f3f7ee9bd2e43aefa62709a
refs/heads/master: 8a28af7f7e42cd0f107e0d84e4ece89e7ef24d3f
26 changes: 25 additions & 1 deletion trunk/drivers/serial/uartlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,26 @@ static int ulite_verify_port(struct uart_port *port, struct serial_struct *ser)
return -EINVAL;
}

#ifdef CONFIG_CONSOLE_POLL
static int ulite_get_poll_char(struct uart_port *port)
{
if (!(ioread32be(port->membase + ULITE_STATUS)
& ULITE_STATUS_RXVALID))
return NO_POLL_CHAR;

return ioread32be(port->membase + ULITE_RX);
}

static void ulite_put_poll_char(struct uart_port *port, unsigned char ch)
{
while (ioread32be(port->membase + ULITE_STATUS) & ULITE_STATUS_TXFULL)
cpu_relax();

/* write char to device */
iowrite32be(ch, port->membase + ULITE_TX);
}
#endif

static struct uart_ops ulite_ops = {
.tx_empty = ulite_tx_empty,
.set_mctrl = ulite_set_mctrl,
Expand All @@ -338,7 +358,11 @@ static struct uart_ops ulite_ops = {
.release_port = ulite_release_port,
.request_port = ulite_request_port,
.config_port = ulite_config_port,
.verify_port = ulite_verify_port
.verify_port = ulite_verify_port,
#ifdef CONFIG_CONSOLE_POLL
.poll_get_char = ulite_get_poll_char,
.poll_put_char = ulite_put_poll_char,
#endif
};

/* ---------------------------------------------------------------------
Expand Down

0 comments on commit 9e5715b

Please sign in to comment.