forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/tty/serial/pic32_uart.c
....@@ -618,7 +618,7 @@
618618 "pic32_uart_mem"))
619619 return -EBUSY;
620620
621
- port->membase = devm_ioremap_nocache(port->dev, port->mapbase,
621
+ port->membase = devm_ioremap(port->dev, port->mapbase,
622622 resource_size(res_mem));
623623 if (!port->membase) {
624624 dev_err(port->dev, "Unable to map registers\n");
....@@ -768,11 +768,6 @@
768768 }
769769 console_initcall(pic32_console_init);
770770
771
-static inline bool is_pic32_console_port(struct uart_port *port)
772
-{
773
- return port->cons && port->cons->index == port->line;
774
-}
775
-
776771 /*
777772 * Late console initialization.
778773 */
....@@ -873,8 +868,7 @@
873868 }
874869
875870 #ifdef CONFIG_SERIAL_PIC32_CONSOLE
876
- if (is_pic32_console_port(port) &&
877
- (pic32_console.flags & CON_ENABLED)) {
871
+ if (uart_console(port) && (pic32_console.flags & CON_ENABLED)) {
878872 /* The peripheral clock has been enabled by console_setup,
879873 * so disable it till the port is used.
880874 */