Kernel: Platform TTY_INIT_BAUD can override the default baud rate for
authorWill Sowerbutts <will@sowerbutts.com>
Fri, 17 Apr 2015 19:20:34 +0000 (20:20 +0100)
committerWill Sowerbutts <will@sowerbutts.com>
Fri, 24 Apr 2015 19:50:13 +0000 (20:50 +0100)
all ttys (including the console)

Kernel/platform-zeta-v2/config.h
Kernel/platform-zeta-v2/kernel.def
Kernel/start.c

index 01e8159..4253422 100644 (file)
@@ -71,6 +71,7 @@
 
        /* UART0 as the console */
        #define BOOT_TTY (512 + 1)
+       #define TTY_INIT_BAUD B115200
 #endif
 
 #define TTYDEV   BOOT_TTY /* Device used by kernel for messages, panics */
index cacebb2..5ab67dc 100644 (file)
@@ -12,7 +12,7 @@ PROGLOAD              .equ    0x0100
 
 ; Zeta SBC V2 mnemonics for I/O ports etc
 
-CONSOLE_RATE           .equ    9600
+CONSOLE_RATE           .equ    115200
 
 CPU_CLOCK_KHZ          .equ    20000
 
index 2d6e25e..c57e130 100644 (file)
  *     make the entire of this disappear after the initial _execve
  */
 
+#ifndef TTY_INIT_BAUD
+#define TTY_INIT_BAUD B9600
+#endif
+
 static const struct termios ttydflt = {
        BRKINT | ICRNL,
        OPOST | ONLCR,
-       CS8 | B9600 | CREAD | HUPCL,
+       CS8 | TTY_INIT_BAUD | CREAD | HUPCL,
        ISIG | ICANON | ECHO | ECHOE | ECHOK | IEXTEN,
        {CTRL('D'), 0, 127, CTRL('C'),
         CTRL('U'), CTRL('\\'), CTRL('Q'), CTRL('S'),