trs80: update for termios masks
authorAlan Cox <alan@linux.intel.com>
Tue, 2 Oct 2018 11:45:44 +0000 (12:45 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 2 Oct 2018 11:45:44 +0000 (12:45 +0100)
Kernel/platform-trs80/devtty.c

index edaabd9..6eb6af0 100644 (file)
@@ -33,6 +33,29 @@ struct  s_queue  ttyinq[NUM_DEV_TTY+1] = {       /* ttyinq[0] is never used */
     {   tbuf3,   tbuf3,   tbuf3,   TTYSIZ,   0,   TTYSIZ/2 }
 };
 
+static tcflag_t console_mask[4] = {
+       _ISYS,
+       _OSYS,
+       _CSYS,
+       _LSYS
+};
+
+static tcflag_t uart_mask[4] = {
+       _ISYS,
+       /* FIXME: break */
+       _OSYS,
+       /* FIXME CTS/RTS, CSTOPB ? */
+       CSIZE|CBAUD|PARENB|PARODD|_CSYS,
+       _LSYS,
+};
+
+tcflag_t *termios_mask[NUM_DEV_TTY + 1] = {
+       NULL,
+       console_mask,
+       console_mask,
+       uart_mask
+};
+
 /* Write to system console */
 void kputchar(char c)
 {
@@ -121,6 +144,7 @@ void tty_putc(uint8_t minor, unsigned char c)
 
 void tty_interrupt(void)
 {
+    /* TODO: carrier change handling */
     uint8_t reg = tr1865_status;
     if (reg & 0x80) {
         reg = tr1865_rxtx;