--- zzzz-none-000/linux-4.9.279/drivers/tty/serial/8250/8250_core.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/drivers/tty/serial/8250/8250_core.c 2023-02-08 11:43:42.000000000 +0000 @@ -17,6 +17,10 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ +/* + * Includes Intel Corporation's changes/modifications dated: 2017, 2019. + * Changed/modified portions - Copyright (c) 2017-2019, Intel Corporation. + */ #include #include @@ -45,6 +49,8 @@ #include "8250.h" +#include + /* * Configuration: * share_irqs - whether we pass IRQF_SHARED to request_irq(). This option @@ -1124,6 +1130,13 @@ ret = sunserial_register_minors(&serial8250_reg, UART_NR); #else serial8250_reg.nr = UART_NR; + +#ifdef CONFIG_INTEL_UART_ENABLE_CONTROL + if (uart_sysfs_create_uart_enable_ctrl()) { + ret = -ENOMEM; + goto out; + } +#endif ret = uart_register_driver(&serial8250_reg); #endif if (ret) @@ -1162,6 +1175,9 @@ uart_unregister_driver(&serial8250_reg); #endif out: +#ifndef CONFIG_INTEL_UART_ENABLE + intel_ce2700_config_atom_uartctrl(0); +#endif return ret; }