aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/sunsu.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 23d19d394320..ddc97c905e14 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1285,6 +1285,7 @@ static struct uart_driver sunsu_reg = {
1285 1285
1286static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) 1286static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel)
1287{ 1287{
1288 int quot, baud;
1288#ifdef CONFIG_SERIO 1289#ifdef CONFIG_SERIO
1289 struct serio *serio; 1290 struct serio *serio;
1290#endif 1291#endif
@@ -1293,10 +1294,14 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel)
1293 up->port.type = PORT_UNKNOWN; 1294 up->port.type = PORT_UNKNOWN;
1294 up->port.uartclk = (SU_BASE_BAUD * 16); 1295 up->port.uartclk = (SU_BASE_BAUD * 16);
1295 1296
1296 if (up->su_type == SU_PORT_KBD) 1297 if (up->su_type == SU_PORT_KBD) {
1297 up->cflag = B1200 | CS8 | CLOCAL | CREAD; 1298 up->cflag = B1200 | CS8 | CLOCAL | CREAD;
1298 else 1299 baud = 1200;
1300 } else {
1299 up->cflag = B4800 | CS8 | CLOCAL | CREAD; 1301 up->cflag = B4800 | CS8 | CLOCAL | CREAD;
1302 baud = 4800;
1303 }
1304 quot = up->port.uartclk / (16 * baud);
1300 1305
1301 sunsu_autoconfig(up); 1306 sunsu_autoconfig(up);
1302 if (up->port.type == PORT_UNKNOWN) 1307 if (up->port.type == PORT_UNKNOWN)
@@ -1337,6 +1342,8 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel)
1337 } 1342 }
1338#endif 1343#endif
1339 1344
1345 sunsu_change_speed(&up->port, up->cflag, 0, quot);
1346
1340 sunsu_startup(&up->port); 1347 sunsu_startup(&up->port);
1341 return 0; 1348 return 0;
1342} 1349}