From: Will Sowerbutts Date: Fri, 17 Apr 2015 19:20:34 +0000 (+0100) Subject: Kernel: Platform TTY_INIT_BAUD can override the default baud rate for X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=c2c2b6d4a0935b7f890d0d9c6bfb56cd2cb39614;p=FUZIX.git Kernel: Platform TTY_INIT_BAUD can override the default baud rate for all ttys (including the console) --- diff --git a/Kernel/platform-zeta-v2/config.h b/Kernel/platform-zeta-v2/config.h index 01e8159e..4253422a 100644 --- a/Kernel/platform-zeta-v2/config.h +++ b/Kernel/platform-zeta-v2/config.h @@ -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 */ diff --git a/Kernel/platform-zeta-v2/kernel.def b/Kernel/platform-zeta-v2/kernel.def index cacebb28..5ab67dc6 100644 --- a/Kernel/platform-zeta-v2/kernel.def +++ b/Kernel/platform-zeta-v2/kernel.def @@ -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 diff --git a/Kernel/start.c b/Kernel/start.c index 2d6e25e3..c57e130c 100644 --- a/Kernel/start.c +++ b/Kernel/start.c @@ -12,10 +12,14 @@ * 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'),