diff options
author | David S. Miller <davem@davemloft.net> | 2005-04-22 01:06:13 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-04-22 01:06:13 -0400 |
commit | 623f41eb923d7f34888cbd9e4f50a7b1a79d0ae5 (patch) | |
tree | 261baa54024f334d2a6f888e383e75cc12ffd757 | |
parent | b4bca26c0160f48b4eb04f21d31a229832732013 (diff) |
[SPARC64]: In sunsu driver, make sure to fully init chip for kbd/ms
We were forgetting to call sunsu_change_speed(). The reason
that replugging in the mouse cable "fixes things" is that
causes a BREAK interrupt which in turn caused a call to
sunsu_change_speed() which would get the chip setup properly.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/serial/sunsu.c | 11 |
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 | ||
1286 | static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) | 1286 | static 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 | } |