Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125020
b: refs/heads/master
c: 80d5c47
h: refs/heads/master
v: v3
  • Loading branch information
Graf Yang authored and Linus Torvalds committed Jan 2, 2009
1 parent 8ceaa83 commit 7d29ae9
Show file tree
Hide file tree
Showing 2 changed files with 25 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: 52e15f0eae193a8e4ca31c1520179b8d65c79811
refs/heads/master: 80d5c474b87da88eca8e1ab034e26daa9f688130
24 changes: 24 additions & 0 deletions trunk/drivers/serial/bfin_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart);

static void bfin_serial_mctrl_check(struct bfin_serial_port *uart);

static void bfin_serial_reset_irda(struct uart_port *port);

/*
* interrupts are disabled on entry
*/
Expand Down Expand Up @@ -105,6 +107,14 @@ static void bfin_serial_stop_tx(struct uart_port *port)
static void bfin_serial_start_tx(struct uart_port *port)
{
struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
struct tty_struct *tty = uart->port.info->port.tty;

/*
* To avoid losting RX interrupt, we reset IR function
* before sending data.
*/
if (tty->termios->c_line == N_IRDA)
bfin_serial_reset_irda(port);

#ifdef CONFIG_SERIAL_BFIN_DMA
if (uart->tx_done)
Expand Down Expand Up @@ -890,6 +900,20 @@ static int bfin_kgdboc_port_startup(struct uart_port *port)
}
#endif

static void bfin_serial_reset_irda(struct uart_port *port)
{
int line = port->line;
unsigned short val;

val = UART_GET_GCTL(&bfin_serial_ports[line]);
val &= ~(IREN | RPOLC);
UART_PUT_GCTL(&bfin_serial_ports[line], val);
SSYNC();
val |= (IREN | RPOLC);
UART_PUT_GCTL(&bfin_serial_ports[line], val);
SSYNC();
}

static struct uart_ops bfin_serial_pops = {
.tx_empty = bfin_serial_tx_empty,
.set_mctrl = bfin_serial_set_mctrl,
Expand Down

0 comments on commit 7d29ae9

Please sign in to comment.