sbcv2: prepare for tty handling improvements
authorAlan Cox <alan@linux.intel.com>
Mon, 1 Oct 2018 21:54:50 +0000 (22:54 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 1 Oct 2018 21:54:50 +0000 (22:54 +0100)
Kernel/platform-sbcv2/devtty.c

index 175610f..d149d00 100644 (file)
@@ -39,6 +39,33 @@ __sfr __at 0x6F uart_scr;
 static char tbuf1[TTYSIZ];
 static char tbuf2[TTYSIZ];
 
+/*
+ *     TTY masks - define which bits can be changed for each port
+ */
+
+tcflag_t uart_mask[4] = {
+       _ISYS,
+       /* FIXME: break */
+       _OSYS,
+       /* FIXME CTS/RTS */
+       CSIZE|CBAUD|CSTOPB|PARENB|PARODD|_CSYS,
+       _LSYS,
+};
+
+tcflag_t prop_mask[4] = {
+       _ISYS,
+       _OSYS,
+       _CSYS,
+       _LSYS
+};
+
+tcflag_t *termios_mask[NUM_DEV_TTY + 1] = {
+       NULL,
+       uart_mask,
+       prop_mask
+};
+
+
 /*
  *     One entry per tty. The 0th entry is never used as tty minor 0 is
  *     special (/dev/tty) and it's cheaper to waste a few bytes that keep