linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / serial / s3c2410.c
index f5aac92..7410e09 100644 (file)
@@ -1066,8 +1066,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
        port->mapbase   = res->start;
        port->membase   = S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART);
        port->irq       = platform_get_irq(platdev, 0);
-       if (port->irq < 0)
-               port->irq = 0;
 
        ourport->clk    = clk_get(&platdev->dev, "uart");
 
@@ -1585,20 +1583,26 @@ s3c24xx_serial_console_txrdy(struct uart_port *port, unsigned int ufcon)
        return (utrstat & S3C2410_UTRSTAT_TXE) ? 1 : 0;
 }
 
-static void
-s3c24xx_serial_console_putchar(struct uart_port *port, int ch)
-{
-       unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON);
-       while (!s3c24xx_serial_console_txrdy(port, ufcon))
-               barrier();
-       wr_regb(cons_uart, S3C2410_UTXH, ch);
-}
-
 static void
 s3c24xx_serial_console_write(struct console *co, const char *s,
                             unsigned int count)
 {
-       uart_console_write(cons_uart, s, count, s3c24xx_serial_console_putchar);
+       int i;
+       unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON);
+
+       for (i = 0; i < count; i++) {
+               while (!s3c24xx_serial_console_txrdy(cons_uart, ufcon))
+                       barrier();
+
+               wr_regb(cons_uart, S3C2410_UTXH, s[i]);
+
+               if (s[i] == '\n') {
+                       while (!s3c24xx_serial_console_txrdy(cons_uart, ufcon))
+                               barrier();
+
+                       wr_regb(cons_uart, S3C2410_UTXH, '\r');
+               }
+       }
 }
 
 static void __init