diff options
Diffstat (limited to 'drivers/serial/s3c2410.c')
-rw-r--r-- | drivers/serial/s3c2410.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 7410e093a6b9..f5aac92fb798 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c | |||
@@ -1066,6 +1066,8 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, | |||
1066 | port->mapbase = res->start; | 1066 | port->mapbase = res->start; |
1067 | port->membase = S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART); | 1067 | port->membase = S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART); |
1068 | port->irq = platform_get_irq(platdev, 0); | 1068 | port->irq = platform_get_irq(platdev, 0); |
1069 | if (port->irq < 0) | ||
1070 | port->irq = 0; | ||
1069 | 1071 | ||
1070 | ourport->clk = clk_get(&platdev->dev, "uart"); | 1072 | ourport->clk = clk_get(&platdev->dev, "uart"); |
1071 | 1073 | ||
@@ -1584,25 +1586,19 @@ s3c24xx_serial_console_txrdy(struct uart_port *port, unsigned int ufcon) | |||
1584 | } | 1586 | } |
1585 | 1587 | ||
1586 | static void | 1588 | static void |
1587 | s3c24xx_serial_console_write(struct console *co, const char *s, | 1589 | s3c24xx_serial_console_putchar(struct uart_port *port, int ch) |
1588 | unsigned int count) | ||
1589 | { | 1590 | { |
1590 | int i; | ||
1591 | unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON); | 1591 | unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON); |
1592 | while (!s3c24xx_serial_console_txrdy(port, ufcon)) | ||
1593 | barrier(); | ||
1594 | wr_regb(cons_uart, S3C2410_UTXH, ch); | ||
1595 | } | ||
1592 | 1596 | ||
1593 | for (i = 0; i < count; i++) { | 1597 | static void |
1594 | while (!s3c24xx_serial_console_txrdy(cons_uart, ufcon)) | 1598 | s3c24xx_serial_console_write(struct console *co, const char *s, |
1595 | barrier(); | 1599 | unsigned int count) |
1596 | 1600 | { | |
1597 | wr_regb(cons_uart, S3C2410_UTXH, s[i]); | 1601 | uart_console_write(cons_uart, s, count, s3c24xx_serial_console_putchar); |
1598 | |||
1599 | if (s[i] == '\n') { | ||
1600 | while (!s3c24xx_serial_console_txrdy(cons_uart, ufcon)) | ||
1601 | barrier(); | ||
1602 | |||
1603 | wr_regb(cons_uart, S3C2410_UTXH, '\r'); | ||
1604 | } | ||
1605 | } | ||
1606 | } | 1602 | } |
1607 | 1603 | ||
1608 | static void __init | 1604 | static void __init |