aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-04-02 07:54:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-09 15:02:43 -0400
commitc21e2654db10bc518b35987617337598fd91ff7e (patch)
treeaad844d039af3fc5be95e195ef3e82e5a6e486eb /drivers/tty
parentcea4b2ce4613feae878c0352b1d76f522faef511 (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')
-rw-r--r--drivers/tty/serial/68328serial.c36
-rw-r--r--drivers/tty/serial/68328serial.h16
2 files changed, 4 insertions, 48 deletions
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index bf5f81113a0..c1cd2147f9d 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 */
219static void batten_down_hatches(void)
220{
221 /* Drop into the debugger */
222}
223
224static 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
235static void receive_chars(struct m68k_serial *info, unsigned short rx) 216static 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);
diff --git a/drivers/tty/serial/68328serial.h b/drivers/tty/serial/68328serial.h
index a804ea56a0b..971ead5a391 100644
--- a/drivers/tty/serial/68328serial.h
+++ b/drivers/tty/serial/68328serial.h
@@ -60,16 +60,7 @@
60 */ 60 */
61 61
62struct m68k_serial { 62struct m68k_serial {
63 char soft_carrier; /* Use soft carrier on this channel */
64 char break_abort; /* Is serial console in, so process brk/abrt */
65 char is_cons; /* Is this our console. */ 63 char is_cons; /* Is this our console. */
66
67 /* We need to know the current clock divisor
68 * to read the bps rate the chip has currently
69 * loaded.
70 */
71 unsigned char clk_divisor; /* May be 1, 16, 32, or 64 */
72 int baud;
73 int magic; 64 int magic;
74 int baud_base; 65 int baud_base;
75 int port; 66 int port;
@@ -77,17 +68,10 @@ struct m68k_serial {
77 int flags; /* defined in tty.h */ 68 int flags; /* defined in tty.h */
78 int type; /* UART type */ 69 int type; /* UART type */
79 struct tty_struct *tty; 70 struct tty_struct *tty;
80 int read_status_mask;
81 int ignore_status_mask;
82 int timeout;
83 int xmit_fifo_size;
84 int custom_divisor; 71 int custom_divisor;
85 int x_char; /* xon/xoff character */ 72 int x_char; /* xon/xoff character */
86 int close_delay; 73 int close_delay;
87 unsigned short closing_wait; 74 unsigned short closing_wait;
88 unsigned short closing_wait2;
89 unsigned long event;
90 unsigned long last_active;
91 int line; 75 int line;
92 int count; /* # of fd on device */ 76 int count; /* # of fd on device */
93 int blocked_open; /* # of blocked opens */ 77 int blocked_open; /* # of blocked opens */