forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/tty/serial/mpc52xx_uart.c
....@@ -44,10 +44,6 @@
4444 #include <asm/mpc52xx.h>
4545 #include <asm/mpc52xx_psc.h>
4646
47
-#if defined(CONFIG_SERIAL_MPC52xx_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
48
-#define SUPPORT_SYSRQ
49
-#endif
50
-
5147 #include <linux/serial_core.h>
5248
5349
....@@ -1382,12 +1378,8 @@
13821378 ch = psc_ops->read_char(port);
13831379
13841380 /* Handle sysreq char */
1385
-#ifdef SUPPORT_SYSRQ
1386
- if (uart_handle_sysrq_char(port, ch)) {
1387
- port->sysrq = 0;
1381
+ if (uart_handle_sysrq_char(port, ch))
13881382 continue;
1389
- }
1390
-#endif
13911383
13921384 /* Store it */
13931385
....@@ -1770,6 +1762,7 @@
17701762 spin_lock_init(&port->lock);
17711763 port->uartclk = uartclk;
17721764 port->fifosize = 512;
1765
+ port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_MPC52xx_CONSOLE);
17731766 port->iotype = UPIO_MEM;
17741767 port->flags = UPF_BOOT_AUTOCONF |
17751768 (uart_console(port) ? 0 : UPF_IOREMAP);