forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/tty/serial/arc_uart.c
....@@ -21,10 +21,6 @@
2121 * -check if sysreq works
2222 */
2323
24
-#if defined(CONFIG_SERIAL_ARC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
25
-#define SUPPORT_SYSRQ
26
-#endif
27
-
2824 #include <linux/module.h>
2925 #include <linux/serial.h>
3026 #include <linux/console.h>
....@@ -613,10 +609,11 @@
613609 }
614610 uart->baud = val;
615611
616
- port->membase = of_iomap(np, 0);
617
- if (!port->membase)
612
+ port->membase = devm_platform_ioremap_resource(pdev, 0);
613
+ if (IS_ERR(port->membase)) {
618614 /* No point of dev_err since UART itself is hosed here */
619
- return -ENXIO;
615
+ return PTR_ERR(port->membase);
616
+ }
620617
621618 port->irq = irq_of_parse_and_map(np, 0);
622619
....@@ -625,6 +622,7 @@
625622 port->flags = UPF_BOOT_AUTOCONF;
626623 port->line = dev_id;
627624 port->ops = &arc_serial_pops;
625
+ port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_ARC_CONSOLE);
628626
629627 port->fifosize = ARC_UART_TX_FIFO_SIZE;
630628