diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-04-02 07:54:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-09 15:02:43 -0400 |
commit | c21e2654db10bc518b35987617337598fd91ff7e (patch) | |
tree | aad844d039af3fc5be95e195ef3e82e5a6e486eb /drivers/tty/serial/68328serial.c | |
parent | cea4b2ce4613feae878c0352b1d76f522faef511 (diff) |
TTY: 68328serial, remove unused stuff from m68k_serial
Not everything from struct m68k_serial is really used. So remove
unused or only-set members of that structure. Next step is to move it
to 68328serial.c and remove 68328serial.h completely.
This change also takes status_handle and batten_down_hatches away
since they use break_abort but do nothing.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/68328serial.c')
-rw-r--r-- | drivers/tty/serial/68328serial.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c index bf5f81113a0e..c1cd2147f9dd 100644 --- a/drivers/tty/serial/68328serial.c +++ b/drivers/tty/serial/68328serial.c | |||
@@ -213,25 +213,6 @@ static void rs_start(struct tty_struct *tty) | |||
213 | local_irq_restore(flags); | 213 | local_irq_restore(flags); |
214 | } | 214 | } |
215 | 215 | ||
216 | /* Drop into either the boot monitor or kadb upon receiving a break | ||
217 | * from keyboard/console input. | ||
218 | */ | ||
219 | static void batten_down_hatches(void) | ||
220 | { | ||
221 | /* Drop into the debugger */ | ||
222 | } | ||
223 | |||
224 | static void status_handle(struct m68k_serial *info, unsigned short status) | ||
225 | { | ||
226 | /* If this is console input and this is a | ||
227 | * 'break asserted' status change interrupt | ||
228 | * see if we can drop into the debugger | ||
229 | */ | ||
230 | if((status & URX_BREAK) && info->break_abort) | ||
231 | batten_down_hatches(); | ||
232 | return; | ||
233 | } | ||
234 | |||
235 | static void receive_chars(struct m68k_serial *info, unsigned short rx) | 216 | static void receive_chars(struct m68k_serial *info, unsigned short rx) |
236 | { | 217 | { |
237 | struct tty_struct *tty = info->tty; | 218 | struct tty_struct *tty = info->tty; |
@@ -248,7 +229,6 @@ static void receive_chars(struct m68k_serial *info, unsigned short rx) | |||
248 | 229 | ||
249 | if(info->is_cons) { | 230 | if(info->is_cons) { |
250 | if(URX_BREAK & rx) { /* whee, break received */ | 231 | if(URX_BREAK & rx) { /* whee, break received */ |
251 | status_handle(info, rx); | ||
252 | return; | 232 | return; |
253 | #ifdef CONFIG_MAGIC_SYSRQ | 233 | #ifdef CONFIG_MAGIC_SYSRQ |
254 | } else if (ch == 0x10) { /* ^P */ | 234 | } else if (ch == 0x10) { /* ^P */ |
@@ -269,16 +249,13 @@ static void receive_chars(struct m68k_serial *info, unsigned short rx) | |||
269 | 249 | ||
270 | flag = TTY_NORMAL; | 250 | flag = TTY_NORMAL; |
271 | 251 | ||
272 | if(rx & URX_PARITY_ERROR) { | 252 | if (rx & URX_PARITY_ERROR) |
273 | flag = TTY_PARITY; | 253 | flag = TTY_PARITY; |
274 | status_handle(info, rx); | 254 | else if (rx & URX_OVRUN) |
275 | } else if(rx & URX_OVRUN) { | ||
276 | flag = TTY_OVERRUN; | 255 | flag = TTY_OVERRUN; |
277 | status_handle(info, rx); | 256 | else if (rx & URX_FRAME_ERROR) |
278 | } else if(rx & URX_FRAME_ERROR) { | ||
279 | flag = TTY_FRAME; | 257 | flag = TTY_FRAME; |
280 | status_handle(info, rx); | 258 | |
281 | } | ||
282 | tty_insert_flip_char(tty, ch, flag); | 259 | tty_insert_flip_char(tty, ch, flag); |
283 | #ifndef CONFIG_XCOPILOT_BUGS | 260 | #ifndef CONFIG_XCOPILOT_BUGS |
284 | } while((rx = uart->urx.w) & URX_DATA_READY); | 261 | } while((rx = uart->urx.w) & URX_DATA_READY); |
@@ -369,7 +346,6 @@ static int startup(struct m68k_serial * info) | |||
369 | */ | 346 | */ |
370 | 347 | ||
371 | uart->ustcnt = USTCNT_UEN; | 348 | uart->ustcnt = USTCNT_UEN; |
372 | info->xmit_fifo_size = 1; | ||
373 | uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_TXEN; | 349 | uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_TXEN; |
374 | (void)uart->urx.w; | 350 | (void)uart->urx.w; |
375 | 351 | ||
@@ -499,7 +475,6 @@ static void change_speed(struct m68k_serial *info) | |||
499 | i = (i & ~CBAUDEX) + B38400; | 475 | i = (i & ~CBAUDEX) + B38400; |
500 | } | 476 | } |
501 | 477 | ||
502 | info->baud = baud_table[i]; | ||
503 | uart->ubaud = PUT_FIELD(UBAUD_DIVIDE, hw_baud_table[i].divisor) | | 478 | uart->ubaud = PUT_FIELD(UBAUD_DIVIDE, hw_baud_table[i].divisor) | |
504 | PUT_FIELD(UBAUD_PRESCALER, hw_baud_table[i].prescale); | 479 | PUT_FIELD(UBAUD_PRESCALER, hw_baud_table[i].prescale); |
505 | 480 | ||
@@ -1034,7 +1009,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp) | |||
1034 | 1009 | ||
1035 | tty_ldisc_flush(tty); | 1010 | tty_ldisc_flush(tty); |
1036 | tty->closing = 0; | 1011 | tty->closing = 0; |
1037 | info->event = 0; | ||
1038 | info->tty = NULL; | 1012 | info->tty = NULL; |
1039 | #warning "This is not and has never been valid so fix it" | 1013 | #warning "This is not and has never been valid so fix it" |
1040 | #if 0 | 1014 | #if 0 |
@@ -1070,7 +1044,6 @@ void rs_hangup(struct tty_struct *tty) | |||
1070 | 1044 | ||
1071 | rs_flush_buffer(tty); | 1045 | rs_flush_buffer(tty); |
1072 | shutdown(info); | 1046 | shutdown(info); |
1073 | info->event = 0; | ||
1074 | info->count = 0; | 1047 | info->count = 0; |
1075 | info->flags &= ~ASYNC_NORMAL_ACTIVE; | 1048 | info->flags &= ~ASYNC_NORMAL_ACTIVE; |
1076 | info->tty = NULL; | 1049 | info->tty = NULL; |
@@ -1270,7 +1243,6 @@ rs68328_init(void) | |||
1270 | info->close_delay = 50; | 1243 | info->close_delay = 50; |
1271 | info->closing_wait = 3000; | 1244 | info->closing_wait = 3000; |
1272 | info->x_char = 0; | 1245 | info->x_char = 0; |
1273 | info->event = 0; | ||
1274 | info->count = 0; | 1246 | info->count = 0; |
1275 | info->blocked_open = 0; | 1247 | info->blocked_open = 0; |
1276 | init_waitqueue_head(&info->open_wait); | 1248 | init_waitqueue_head(&info->open_wait); |