X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=drivers%2Fserial%2Fpxa.c;h=bf85b5782ac5c3295f33f7956473d6171bc630ef;hb=80f7228b59e4bbe9d840af3ff0f2fe480d6e7c79;hp=ff5e6309d682c132a455b5b285bfcd96af1b3cc2;hpb=4060994c3e337b40e0f6fa8ce2cc178e021baf3d;p=deliverable%2Flinux.git diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index ff5e6309d682..bf85b5782ac5 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c @@ -107,14 +107,6 @@ receive_chars(struct uart_pxa_port *up, int *status, struct pt_regs *regs) int max_count = 256; do { - if (unlikely(tty->flip.count >= TTY_FLIPBUF_SIZE)) { - if (tty->low_latency) - tty_flip_buffer_push(tty); - /* - * If this failed then we will throw away the - * bytes but must do so to clear interrupts - */ - } ch = serial_in(up, UART_RX); flag = TTY_NORMAL; up->port.icount.rx++; @@ -277,7 +269,6 @@ static unsigned int serial_pxa_get_mctrl(struct uart_port *port) unsigned char status; unsigned int ret; -return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; status = serial_in(up, UART_MSR); ret = 0; @@ -361,7 +352,7 @@ static int serial_pxa_startup(struct uart_port *port) if (port->line == 3) /* HWUART */ up->mcr |= UART_MCR_AFE; else - up->mcr = 0; + up->mcr = 0; /* * Allocate the IRQ @@ -399,7 +390,7 @@ static int serial_pxa_startup(struct uart_port *port) /* * Finally, enable interrupts. Note: Modem status interrupts - * are set via set_termios(), which will be occuring imminently + * are set via set_termios(), which will be occurring imminently * anyway, so we don't enable them here. */ up->ier = UART_IER_RLSI | UART_IER_RDI | UART_IER_RTOIE | UART_IER_UUE; @@ -627,6 +618,14 @@ static inline void wait_for_xmitr(struct uart_pxa_port *up) } } +static void serial_pxa_console_putchar(struct uart_port *port, int ch) +{ + struct uart_pxa_port *up = (struct uart_pxa_port *)port; + + wait_for_xmitr(up); + serial_out(up, UART_TX, ch); +} + /* * Print a string to the serial port trying not to disturb * any possible real use of the port... @@ -638,30 +637,14 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count) { struct uart_pxa_port *up = &serial_pxa_ports[co->index]; unsigned int ier; - int i; /* - * First save the UER then disable the interrupts + * First save the IER then disable the interrupts */ ier = serial_in(up, UART_IER); serial_out(up, UART_IER, UART_IER_UUE); - /* - * Now, do each character - */ - for (i = 0; i < count; i++, s++) { - wait_for_xmitr(up); - - /* - * Send the character out. - * If a LF, also do CR... - */ - serial_out(up, UART_TX, *s); - if (*s == 10) { - wait_for_xmitr(up); - serial_out(up, UART_TX, 13); - } - } + uart_console_write(&up->port, s, count, serial_pxa_console_putchar); /* * Finally, wait for transmitter to become empty @@ -797,7 +780,6 @@ static struct uart_pxa_port serial_pxa_ports[] = { static struct uart_driver serial_pxa_reg = { .owner = THIS_MODULE, .driver_name = "PXA serial", - .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, .minor = 64,