diff options
Diffstat (limited to 'arch/xtensa/platforms/iss/console.c')
-rw-r--r-- | arch/xtensa/platforms/iss/console.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index da9866f7fecf..70cb408bc20d 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c | |||
@@ -56,13 +56,13 @@ static void rs_poll(unsigned long); | |||
56 | static int rs_open(struct tty_struct *tty, struct file * filp) | 56 | static int rs_open(struct tty_struct *tty, struct file * filp) |
57 | { | 57 | { |
58 | tty->port = &serial_port; | 58 | tty->port = &serial_port; |
59 | spin_lock(&timer_lock); | 59 | spin_lock_bh(&timer_lock); |
60 | if (tty->count == 1) { | 60 | if (tty->count == 1) { |
61 | setup_timer(&serial_timer, rs_poll, | 61 | setup_timer(&serial_timer, rs_poll, |
62 | (unsigned long)&serial_port); | 62 | (unsigned long)&serial_port); |
63 | mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE); | 63 | mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE); |
64 | } | 64 | } |
65 | spin_unlock(&timer_lock); | 65 | spin_unlock_bh(&timer_lock); |
66 | 66 | ||
67 | return 0; | 67 | return 0; |
68 | } | 68 | } |
@@ -99,14 +99,13 @@ static int rs_write(struct tty_struct * tty, | |||
99 | static void rs_poll(unsigned long priv) | 99 | static void rs_poll(unsigned long priv) |
100 | { | 100 | { |
101 | struct tty_port *port = (struct tty_port *)priv; | 101 | struct tty_port *port = (struct tty_port *)priv; |
102 | struct timeval tv = { .tv_sec = 0, .tv_usec = 0 }; | ||
103 | int i = 0; | 102 | int i = 0; |
104 | unsigned char c; | 103 | unsigned char c; |
105 | 104 | ||
106 | spin_lock(&timer_lock); | 105 | spin_lock(&timer_lock); |
107 | 106 | ||
108 | while (__simc(SYS_select_one, 0, XTISS_SELECT_ONE_READ, (int)&tv,0,0)){ | 107 | while (simc_poll(0)) { |
109 | __simc (SYS_read, 0, (unsigned long)&c, 1, 0, 0); | 108 | simc_read(0, &c, 1); |
110 | tty_insert_flip_char(port, c, TTY_NORMAL); | 109 | tty_insert_flip_char(port, c, TTY_NORMAL); |
111 | i++; | 110 | i++; |
112 | } | 111 | } |
@@ -244,8 +243,7 @@ static void iss_console_write(struct console *co, const char *s, unsigned count) | |||
244 | int len = strlen(s); | 243 | int len = strlen(s); |
245 | 244 | ||
246 | if (s != 0 && *s != 0) | 245 | if (s != 0 && *s != 0) |
247 | __simc (SYS_write, 1, (unsigned long)s, | 246 | simc_write(1, s, count < len ? count : len); |
248 | count < len ? count : len,0,0); | ||
249 | } | 247 | } |
250 | 248 | ||
251 | static struct tty_driver* iss_console_device(struct console *c, int *index) | 249 | static struct tty_driver* iss_console_device(struct console *c, int *index) |