diff options
author | David S. Miller <davem@davemloft.net> | 2005-04-21 22:06:13 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-04-21 22:06:13 -0700 |
commit | 623f41eb923d7f34888cbd9e4f50a7b1a79d0ae5 (patch) | |
tree | 261baa54024f334d2a6f888e383e75cc12ffd757 /drivers/serial | |
parent | b4bca26c0160f48b4eb04f21d31a229832732013 (diff) | |
download | talos-obmc-linux-623f41eb923d7f34888cbd9e4f50a7b1a79d0ae5.tar.gz talos-obmc-linux-623f41eb923d7f34888cbd9e4f50a7b1a79d0ae5.zip |
[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>
Diffstat (limited to 'drivers/serial')
-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 = { static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) { + int quot, baud; #ifdef CONFIG_SERIO struct serio *serio; #endif @@ -1293,10 +1294,14 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) up->port.type = PORT_UNKNOWN; up->port.uartclk = (SU_BASE_BAUD * 16); - if (up->su_type == SU_PORT_KBD) + if (up->su_type == SU_PORT_KBD) { up->cflag = B1200 | CS8 | CLOCAL | CREAD; - else + baud = 1200; + } else { up->cflag = B4800 | CS8 | CLOCAL | CREAD; + baud = 4800; + } + quot = up->port.uartclk / (16 * baud); sunsu_autoconfig(up); if (up->port.type == PORT_UNKNOWN) @@ -1337,6 +1342,8 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) } #endif + sunsu_change_speed(&up->port, up->cflag, 0, quot); + sunsu_startup(&up->port); return 0; } |