Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304232
b: refs/heads/master
c: 3c2d0ed
h: refs/heads/master
v: v3
  • Loading branch information
Sonic Zhang authored and Greg Kroah-Hartman committed May 17, 2012
1 parent 139246e commit f25c56d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 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: 239c25b1a03cf57193b9a52623deb918adf6132e
refs/heads/master: 3c2d0ed221a22ce2c1c9fe1e2d6142374917642e
22 changes: 10 additions & 12 deletions trunk/drivers/tty/serial/bfin_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
static irqreturn_t bfin_serial_dma_rx_int(int irq, void *dev_id)
{
struct bfin_serial_port *uart = dev_id;
unsigned short irqstat;
unsigned int irqstat;
int x_pos, pos;

spin_lock(&uart->rx_lock);
Expand Down Expand Up @@ -582,7 +582,7 @@ static irqreturn_t bfin_serial_dma_rx_int(int irq, void *dev_id)
static unsigned int bfin_serial_tx_empty(struct uart_port *port)
{
struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
unsigned short lsr;
unsigned int lsr;

lsr = UART_GET_LSR(uart);
if (lsr & TEMT)
Expand Down Expand Up @@ -741,7 +741,7 @@ static int bfin_serial_startup(struct uart_port *port)
}

/* CTS RTS PINs are negative assertive. */
UART_PUT_MCR(uart, ACTS);
UART_PUT_MCR(uart, UART_GET_MCR(uart) | ACTS);
UART_SET_IER(uart, EDSSI);
}
#endif
Expand Down Expand Up @@ -799,7 +799,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
unsigned long flags;
unsigned int baud, quot;
unsigned short val, ier, lcr = 0;
unsigned int ier, lcr = 0;

switch (termios->c_cflag & CSIZE) {
case CS8:
Expand Down Expand Up @@ -871,6 +871,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,

/* Disable UART */
ier = UART_GET_IER(uart);
UART_PUT_GCTL(uart, UART_GET_GCTL(uart) & ~UCEN);
UART_DISABLE_INTS(uart);

/* Set DLAB in LCR to Access CLK */
Expand All @@ -882,14 +883,11 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
/* Clear DLAB in LCR to Access THR RBR IER */
UART_CLEAR_DLAB(uart);

UART_PUT_LCR(uart, lcr);
UART_PUT_LCR(uart, (UART_GET_LCR(uart) & ~LCR_MASK) | lcr);

/* Enable UART */
UART_ENABLE_INTS(uart, ier);

val = UART_GET_GCTL(uart);
val |= UCEN;
UART_PUT_GCTL(uart, val);
UART_PUT_GCTL(uart, UART_GET_GCTL(uart) | UCEN);

/* Port speed changed, update the per-port timeout. */
uart_update_timeout(port, termios->c_cflag, baud);
Expand Down Expand Up @@ -949,7 +947,7 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser)
static void bfin_serial_set_ldisc(struct uart_port *port, int ld)
{
struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
unsigned short val;
unsigned int val;

switch (ld) {
case N_IRDA:
Expand All @@ -967,7 +965,7 @@ static void bfin_serial_set_ldisc(struct uart_port *port, int ld)
static void bfin_serial_reset_irda(struct uart_port *port)
{
struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
unsigned short val;
unsigned int val;

val = UART_GET_GCTL(uart);
val &= ~(UMOD_MASK | RPOLC);
Expand Down Expand Up @@ -1065,7 +1063,7 @@ static void __init
bfin_serial_console_get_options(struct bfin_serial_port *uart, int *baud,
int *parity, int *bits)
{
unsigned short status;
unsigned int status;

status = UART_GET_IER(uart) & (ERBFI | ETBEI);
if (status == (ERBFI | ETBEI)) {
Expand Down

0 comments on commit f25c56d

Please sign in to comment.