summaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-02-17 01:29:44 +0100
committerDavid Bauer <mail@david-bauer.net>2021-02-20 01:26:33 +0100
commitd6b785d47739a84611088ab26256fa5808d06a9d (patch)
treed45ffa6e6182ce80ec35663de8c514888655e1b8 /target/linux/ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch
parentfb64e2c30f0cba887d3b183ce52de36b3e8bbb7e (diff)
downloadopenwrt-d6b785d47739a84611088ab26256fa5808d06a9d.tar.gz
openwrt-d6b785d47739a84611088ab26256fa5808d06a9d.tar.bz2
openwrt-d6b785d47739a84611088ab26256fa5808d06a9d.zip
ath79: add kernel 5.10 support
This adds Kernel 5.10 support for the generic, nand and tiny subtargets. The following patch is not contained, as it needs to be reworked: platform/920-mikrotik-rb4xx.patch Tested-on: - Siemens WS-AP3610 - Enterasys WS-AP3710 - Aerohive HiveAP 121 - TP-Link TL-WA901 v2 - TP-Link TL-WR741 v1 Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch')
-rw-r--r--target/linux/ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/target/linux/ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch b/target/linux/ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch
new file mode 100644
index 0000000000..dac2064cbb
--- /dev/null
+++ b/target/linux/ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch
@@ -0,0 +1,54 @@
+From 4d3c17975c7814884a721fe693b3adf5c426d759 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Tue, 10 Nov 2015 22:18:39 +0100
+Subject: [RFC] serial: core: add support for boot console with arbitrary
+ baud rates
+
+The Arduino Yun uses a baud rate of 250000 by default. The serial is
+going over the Atmel ATmega and is used to connect to this chip.
+Without this patch Linux wants to switch the console to 9600 Baud.
+
+With this patch Linux will use the configured baud rate and not a
+default one specified in uart_register_driver().
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+[rebased to 4.14, slightly reworded commit message]
+Signed-off-by: Sungbo Eo <mans0n@gorani.run>
+---
+ drivers/tty/serial/serial_core.c | 6 +++++-
+ include/linux/console.h | 1 +
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+--- a/drivers/tty/serial/serial_core.c
++++ b/drivers/tty/serial/serial_core.c
+@@ -220,6 +220,8 @@ static int uart_port_startup(struct tty_
+ if (retval == 0) {
+ if (uart_console(uport) && uport->cons->cflag) {
+ tty->termios.c_cflag = uport->cons->cflag;
++ tty->termios.c_ospeed = uport->cons->baud;
++ tty->termios.c_ispeed = uport->cons->baud;
+ uport->cons->cflag = 0;
+ }
+ /*
+@@ -2108,8 +2110,10 @@ uart_set_options(struct uart_port *port,
+ * Allow the setting of the UART parameters with a NULL console
+ * too:
+ */
+- if (co)
++ if (co) {
+ co->cflag = termios.c_cflag;
++ co->baud = baud;
++ }
+
+ return 0;
+ }
+--- a/include/linux/console.h
++++ b/include/linux/console.h
+@@ -153,6 +153,7 @@ struct console {
+ short flags;
+ short index;
+ int cflag;
++ int baud;
+ void *data;
+ struct console *next;
+ };