Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289267
b: refs/heads/master
c: 5816269
h: refs/heads/master
i:
  289265: a7948f2
  289263: 1f4c0da
v: v3
  • Loading branch information
Paul Walmsley authored and Greg Kroah-Hartman committed Feb 2, 2012
1 parent f8b56b5 commit d084525
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 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: d4e33fac2408d37f7b52e80ca2a89f9fb482914f
refs/heads/master: 5816269e4ee3db2bc2ad44afc89f4abe81c7aa26
20 changes: 17 additions & 3 deletions trunk/drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@

#define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/

/* SCR register bitmasks */
#define OMAP_UART_SCR_RX_TRIG_GRANU1_MASK (1 << 7)

/* FCR register bitmasks */
#define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT 6
#define OMAP_UART_FCR_RX_FIFO_TRIG_MASK (0x3 << 6)

static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];

/* Forward declaration of functions */
Expand Down Expand Up @@ -811,14 +818,21 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
up->mcr = serial_in(up, UART_MCR);
serial_out(up, UART_MCR, up->mcr | UART_MCR_TCRTLR);
/* FIFO ENABLE, DMA MODE */
serial_out(up, UART_FCR, up->fcr);
serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);

up->scr |= OMAP_UART_SCR_RX_TRIG_GRANU1_MASK;

if (up->use_dma) {
serial_out(up, UART_TI752_TLR, 0);
up->scr |= (UART_FCR_TRIGGER_4 | UART_FCR_TRIGGER_8);
up->scr |= UART_FCR_TRIGGER_4;
} else {
/* Set receive FIFO threshold to 1 byte */
up->fcr &= ~OMAP_UART_FCR_RX_FIFO_TRIG_MASK;
up->fcr |= (0x1 << OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT);
}

serial_out(up, UART_FCR, up->fcr);
serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);

serial_out(up, UART_OMAP_SCR, up->scr);

serial_out(up, UART_EFR, up->efr);
Expand Down

0 comments on commit d084525

Please sign in to comment.