summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0042-serial-8250-Switch-to-nbcon-console.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches-rt/0042-serial-8250-Switch-to-nbcon-console.patch (renamed from debian/patches-rt/0044-serial-8250-Switch-to-nbcon-console.patch)37
1 files changed, 17 insertions, 20 deletions
diff --git a/debian/patches-rt/0044-serial-8250-Switch-to-nbcon-console.patch b/debian/patches-rt/0042-serial-8250-Switch-to-nbcon-console.patch
index 22edc18426..5f9d30af5d 100644
--- a/debian/patches-rt/0044-serial-8250-Switch-to-nbcon-console.patch
+++ b/debian/patches-rt/0042-serial-8250-Switch-to-nbcon-console.patch
@@ -1,14 +1,14 @@
From: John Ogness <john.ogness@linutronix.de>
Date: Wed, 13 Sep 2023 15:30:36 +0000
-Subject: [PATCH 44/48] serial: 8250: Switch to nbcon console
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.8/older/patches-6.8.2-rt11.tar.xz
+Subject: [PATCH 42/46] serial: 8250: Switch to nbcon console
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.9/older/patches-6.9-rt5.tar.xz
Implement the necessary callbacks to switch the 8250 console driver
to perform as an nbcon console.
Add implementations for the nbcon console callbacks (write_atomic,
-write_thread, device_lock, device_unlock), provide @nbcon_drvdata, and
-add CON_NBCON to the initial flags.
+write_thread, device_lock, device_unlock) and add CON_NBCON to the
+initial flags.
The legacy code is kept in order to easily switch back to legacy mode
by defining CONFIG_SERIAL_8250_LEGACY_CONSOLE.
@@ -16,10 +16,10 @@ by defining CONFIG_SERIAL_8250_LEGACY_CONSOLE.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
- drivers/tty/serial/8250/8250_core.c | 45 ++++++++++
+ drivers/tty/serial/8250/8250_core.c | 42 +++++++++
drivers/tty/serial/8250/8250_port.c | 154 +++++++++++++++++++++++++++++++++++-
include/linux/serial_8250.h | 6 +
- 3 files changed, 202 insertions(+), 3 deletions(-)
+ 3 files changed, 199 insertions(+), 3 deletions(-)
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -31,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void univ8250_console_write(struct console *co, const char *s,
unsigned int count)
{
-@@ -599,6 +600,39 @@ static void univ8250_console_write(struc
+@@ -599,6 +600,37 @@ static void univ8250_console_write(struc
serial8250_console_write(up, s, count);
}
@@ -65,13 +65,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+ __uart_port_unlock_irqrestore(up, flags);
+}
-+
-+static struct nbcon_drvdata serial8250_nbcon_drvdata;
+#endif /* CONFIG_SERIAL_8250_LEGACY_CONSOLE */
static int univ8250_console_setup(struct console *co, char *options)
{
-@@ -698,12 +732,21 @@ static int univ8250_console_match(struct
+@@ -698,12 +730,20 @@ static int univ8250_console_match(struct
static struct console univ8250_console = {
.name = "ttyS",
@@ -84,7 +82,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ .device_lock = univ8250_console_device_lock,
+ .device_unlock = univ8250_console_device_unlock,
+ .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_NBCON,
-+ .nbcon_drvdata = &serial8250_nbcon_drvdata,
+#endif
.device = uart_console_device,
.setup = univ8250_console_setup,
@@ -96,7 +93,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
};
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
-@@ -550,6 +550,13 @@ static int serial8250_em485_init(struct
+@@ -546,6 +546,13 @@ static int serial8250_em485_init(struct
if (!p->em485)
return -ENOMEM;
@@ -110,7 +107,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
hrtimer_init(&p->em485->stop_tx_timer, CLOCK_MONOTONIC,
HRTIMER_MODE_REL);
hrtimer_init(&p->em485->start_tx_timer, CLOCK_MONOTONIC,
-@@ -702,7 +709,11 @@ static void serial8250_set_sleep(struct
+@@ -698,7 +705,11 @@ static void serial8250_set_sleep(struct
serial8250_rpm_put(p);
}
@@ -123,7 +120,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{
if (up->capabilities & UART_CAP_UUE)
serial_out(up, UART_IER, UART_IER_UUE);
-@@ -710,6 +721,11 @@ static void serial8250_clear_IER(struct
+@@ -706,6 +717,11 @@ static void serial8250_clear_IER(struct
serial_out(up, UART_IER, 0);
}
@@ -135,7 +132,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#ifdef CONFIG_SERIAL_8250_RSA
/*
* Attempts to turn on the RSA FIFO. Returns zero on failure.
-@@ -3320,6 +3336,11 @@ static void serial8250_console_putchar(s
+@@ -3272,6 +3288,11 @@ static void serial8250_console_putchar(s
wait_for_xmitr(up, UART_LSR_THRE);
serial_port_out(port, UART_TX, ch);
@@ -147,7 +144,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
/*
-@@ -3348,6 +3369,7 @@ static void serial8250_console_restore(s
+@@ -3300,6 +3321,7 @@ static void serial8250_console_restore(s
serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS);
}
@@ -155,7 +152,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* Print a string to the serial port using the device FIFO
*
-@@ -3406,7 +3428,7 @@ void serial8250_console_write(struct uar
+@@ -3358,7 +3380,7 @@ void serial8250_console_write(struct uar
* First save the IER then disable the interrupts
*/
ier = serial_port_in(port, UART_IER);
@@ -164,7 +161,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* check scratch reg to see if port powered off during system sleep */
if (up->canary && (up->canary != serial_port_in(port, UART_SCR))) {
-@@ -3472,6 +3494,131 @@ void serial8250_console_write(struct uar
+@@ -3424,6 +3446,131 @@ void serial8250_console_write(struct uar
if (locked)
uart_port_unlock_irqrestore(port, flags);
}
@@ -296,7 +293,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static unsigned int probe_baud(struct uart_port *port)
{
-@@ -3490,6 +3637,7 @@ static unsigned int probe_baud(struct ua
+@@ -3442,6 +3589,7 @@ static unsigned int probe_baud(struct ua
int serial8250_console_setup(struct uart_port *port, char *options, bool probe)
{
@@ -304,7 +301,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int baud = 9600;
int bits = 8;
int parity = 'n';
-@@ -3499,6 +3647,8 @@ int serial8250_console_setup(struct uart
+@@ -3451,6 +3599,8 @@ int serial8250_console_setup(struct uart
if (!port->iobase && !port->membase)
return -ENODEV;