aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sunzilog.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 20:33:12 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 20:33:12 -0500
commit9d8f057acbd38d8177cf2ffd5e151d52c2477372 (patch)
tree1c3387b045a8a487ff99bf3abed1cdf41670f6e6 /drivers/serial/sunzilog.c
parent591eb85ecd7e6eb8596c6129ae074e16636b99f4 (diff)
parent91bca4b3e2f1aaaf67e62a36914f33ca1e7d5a06 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial: [SERIAL] Merge avlab serial board entries in parport_serial [SERIAL] kernel console should send CRLF not LFCR
Diffstat (limited to 'drivers/serial/sunzilog.c')
-rw-r--r--drivers/serial/sunzilog.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index 10b35c6f287d..cd49ebbf4a45 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -1252,8 +1252,9 @@ static struct zilog_layout __iomem * __init get_zs(int chip, int node)
1252 1252
1253#define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */ 1253#define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */
1254 1254
1255static void sunzilog_put_char(struct zilog_channel __iomem *channel, unsigned char ch) 1255static void sunzilog_putchar(struct uart_port *port, int ch)
1256{ 1256{
1257 struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port);
1257 int loops = ZS_PUT_CHAR_MAX_DELAY; 1258 int loops = ZS_PUT_CHAR_MAX_DELAY;
1258 1259
1259 /* This is a timed polling loop so do not switch the explicit 1260 /* This is a timed polling loop so do not switch the explicit
@@ -1284,7 +1285,7 @@ static int sunzilog_serio_write(struct serio *serio, unsigned char ch)
1284 1285
1285 spin_lock_irqsave(&sunzilog_serio_lock, flags); 1286 spin_lock_irqsave(&sunzilog_serio_lock, flags);
1286 1287
1287 sunzilog_put_char(ZILOG_CHANNEL_FROM_PORT(&up->port), ch); 1288 sunzilog_putchar(&up->port, ch);
1288 1289
1289 spin_unlock_irqrestore(&sunzilog_serio_lock, flags); 1290 spin_unlock_irqrestore(&sunzilog_serio_lock, flags);
1290 1291
@@ -1325,16 +1326,10 @@ static void
1325sunzilog_console_write(struct console *con, const char *s, unsigned int count) 1326sunzilog_console_write(struct console *con, const char *s, unsigned int count)
1326{ 1327{
1327 struct uart_sunzilog_port *up = &sunzilog_port_table[con->index]; 1328 struct uart_sunzilog_port *up = &sunzilog_port_table[con->index];
1328 struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(&up->port);
1329 unsigned long flags; 1329 unsigned long flags;
1330 int i;
1331 1330
1332 spin_lock_irqsave(&up->port.lock, flags); 1331 spin_lock_irqsave(&up->port.lock, flags);
1333 for (i = 0; i < count; i++, s++) { 1332 uart_console_write(&up->port, s, count, sunzilog_putchar);
1334 sunzilog_put_char(channel, *s);
1335 if (*s == 10)
1336 sunzilog_put_char(channel, 13);
1337 }
1338 udelay(2); 1333 udelay(2);
1339 spin_unlock_irqrestore(&up->port.lock, flags); 1334 spin_unlock_irqrestore(&up->port.lock, flags);
1340} 1335}