trs801: remove surplus code
authorAlan Cox <alan@linux.intel.com>
Fri, 25 May 2018 21:29:56 +0000 (22:29 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 25 May 2018 21:29:56 +0000 (22:29 +0100)
Kernel/platform-trs80m1/devtty.c
Kernel/platform-trs80m1/discard.c

index eed87db..de44657 100644 (file)
 char tbuf1[TTYSIZ];
 char tbuf2[TTYSIZ];
 
-uint8_t curtty;                /* output side */
-uint8_t inputtty;      /* input side */
-static struct vt_switch ttysave[2];
-static uint8_t vtbackbuf[VT_WIDTH * VT_HEIGHT];
 struct vt_repeat keyrepeat;
 
-uint8_t *vtbase[2] = { 0xF800, vtbackbuf };
-
 __sfr __at 0xE8 tr1865_ctrl;
 __sfr __at 0xE9 tr1865_baud;
 __sfr __at 0xEA tr1865_status;
@@ -40,17 +34,12 @@ void kputchar(char c)
 ttyready_t tty_writeready(uint8_t minor)
 {
     uint8_t reg;
-    if (minor != 3)
+    if (minor != 2)
         return TTY_READY_NOW;
     reg = tr1865_status;
     return (reg & 0x40) ? TTY_READY_NOW : TTY_READY_SOON;
 }
 
-void vtbuf_init(void)
-{
-    memset(vtbackbuf, ' ', VT_WIDTH * VT_HEIGHT);
-}
-
 void tty_putc(uint8_t minor, unsigned char c)
 {
     if (minor == 2)
@@ -140,7 +129,7 @@ static void keyproc(void)
        for (i = 0; i < 8; i++) {
                /* Set one of A0 to A7, and read the byte we get back.
                   Invert that to get a mask of pressed buttons */
-               keyin[i] = *(uint8_t *)(0xF400 | (1 << i));
+               keyin[i] = *(uint8_t *)(0x3800 | (1 << i));
                key = keyin[i] ^ keymap[i];
                if (key) {
                        int n;
@@ -233,7 +222,7 @@ static void keydecode(void)
        else if (capslock && c >= 'a' && c <= 'z')
                c -= 'a' - 'A';
        if (c)
-               vt_inproc(inputtty+1, c);
+               vt_inproc(1, c);
 }
 
 void kbd_interrupt(void)
index 9dcac11..aeedbf8 100644 (file)
@@ -5,13 +5,11 @@
 
 void device_init(void)
 {
-  vtbuf_init();
 #ifdef CONFIG_RTC
   /* Time of day clock */
   inittod();
 #endif
   hd_probe();
-  tty_setup(3);
 }
 
 void map_init(void)