forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/tty/serial/ip22zilog.c
....@@ -38,10 +38,6 @@
3838 #include <asm/sgi/hpc3.h>
3939 #include <asm/sgi/ip22.h>
4040
41
-#if defined(CONFIG_SERIAL_IP22_ZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
42
-#define SUPPORT_SYSRQ
43
-#endif
44
-
4541 #include <linux/serial_core.h>
4642
4743 #include "ip22zilog.h"
....@@ -1080,6 +1076,7 @@
10801076
10811077 static void __init ip22zilog_prepare(void)
10821078 {
1079
+ unsigned char sysrq_on = IS_ENABLED(CONFIG_SERIAL_IP22_ZILOG_CONSOLE);
10831080 struct uart_ip22zilog_port *up;
10841081 struct zilog_layout *rp;
10851082 int channel, chip;
....@@ -1115,6 +1112,7 @@
11151112 up[(chip * 2) + 0].port.irq = zilog_irq;
11161113 up[(chip * 2) + 0].port.uartclk = ZS_CLOCK;
11171114 up[(chip * 2) + 0].port.fifosize = 1;
1115
+ up[(chip * 2) + 0].port.has_sysrq = sysrq_on;
11181116 up[(chip * 2) + 0].port.ops = &ip22zilog_pops;
11191117 up[(chip * 2) + 0].port.type = PORT_IP22ZILOG;
11201118 up[(chip * 2) + 0].port.flags = 0;
....@@ -1126,6 +1124,7 @@
11261124 up[(chip * 2) + 1].port.irq = zilog_irq;
11271125 up[(chip * 2) + 1].port.uartclk = ZS_CLOCK;
11281126 up[(chip * 2) + 1].port.fifosize = 1;
1127
+ up[(chip * 2) + 1].port.has_sysrq = sysrq_on;
11291128 up[(chip * 2) + 1].port.ops = &ip22zilog_pops;
11301129 up[(chip * 2) + 1].port.type = PORT_IP22ZILOG;
11311130 up[(chip * 2) + 1].port.line = (chip * 2) + 1;