Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287061
b: refs/heads/master
c: 8a74e9f
h: refs/heads/master
i:
  287059: ff9bcf7
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 26, 2012
1 parent 005f21e commit c51c369
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 32 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: af681cad3f79ad8f7bd6cb170b70990aeef74233
refs/heads/master: 8a74e9ffd97dc9de063de8c02ae32db79dd60436
35 changes: 4 additions & 31 deletions trunk/drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@

#define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/

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

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

/* TLR register bitmasks */
#define OMAP_UART_TLR_TX_FIFO_TRIG_DMA_SHIFT 0

static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];

/* Forward declaration of functions */
Expand Down Expand Up @@ -706,7 +694,6 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
unsigned char efr = 0;
unsigned long flags = 0;
unsigned int baud, quot;
u32 tlr;

switch (termios->c_cflag & CSIZE) {
case CS5:
Expand Down Expand Up @@ -824,28 +811,14 @@ 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 */

up->scr |= OMAP_UART_SCR_TX_TRIG_GRANU1_MASK;
up->scr |= OMAP_UART_SCR_RX_TRIG_GRANU1_MASK;
serial_out(up, UART_FCR, up->fcr);
serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);

if (up->use_dma) {
tlr = 0;
} else {
up->scr &= ~OMAP_UART_SCR_TX_EMPTY;

/* Set receive FIFO threshold to 1 */
up->fcr &= ~OMAP_UART_FCR_RX_FIFO_TRIG_MASK;
up->fcr |= (0x1 << OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT);

/* Set TX FIFO threshold to "63" (actually 1) */
up->fcr |= (0x3 << OMAP_UART_FCR_TX_FIFO_TRIG_SHIFT);
tlr = (0xf << OMAP_UART_TLR_TX_FIFO_TRIG_DMA_SHIFT);
serial_out(up, UART_TI752_TLR, 0);
up->scr |= (UART_FCR_TRIGGER_4 | UART_FCR_TRIGGER_8);
}

serial_out(up, UART_TI752_TLR, tlr);
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 c51c369

Please sign in to comment.