--- zzzz-none-000/linux-3.10.107/drivers/tty/serial/bfin_sport_uart.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/tty/serial/bfin_sport_uart.c 2021-02-04 17:41:59.000000000 +0000 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -161,11 +162,12 @@ if (!uart_handle_sysrq_char(&up->port, ch)) tty_insert_flip_char(port, ch, TTY_NORMAL); } - /* XXX this won't deadlock with lowlat? */ - tty_flip_buffer_push(port); spin_unlock(&up->port.lock); + /* XXX this won't deadlock with lowlat? */ + tty_flip_buffer_push(port); + return IRQ_HANDLED; } @@ -425,11 +427,6 @@ SSYNC(); } -static void sport_enable_ms(struct uart_port *port) -{ - pr_debug("%s enter\n", __func__); -} - static void sport_break_ctl(struct uart_port *port, int break_state) { pr_debug("%s enter\n", __func__); @@ -499,6 +496,13 @@ pr_debug("%s enter, c_cflag:%08x\n", __func__, termios->c_cflag); +#ifdef CONFIG_SERIAL_BFIN_SPORT_CTSRTS + if (old == NULL && up->cts_pin != -1) + termios->c_cflag |= CRTSCTS; + else if (up->cts_pin == -1) + termios->c_cflag &= ~CRTSCTS; +#endif + switch (termios->c_cflag & CSIZE) { case CS8: up->csize = 8; @@ -513,14 +517,15 @@ up->csize = 5; break; default: - pr_warning("requested word length not supported\n"); + pr_warn("requested word length not supported\n"); + break; } if (termios->c_cflag & CSTOPB) { up->stopb = 1; } if (termios->c_cflag & PARENB) { - pr_warning("PAREN bits is not supported yet\n"); + pr_warn("PAREN bit is not supported yet\n"); /* up->parib = 1; */ } @@ -586,7 +591,6 @@ .stop_tx = sport_stop_tx, .start_tx = sport_start_tx, .stop_rx = sport_stop_rx, - .enable_ms = sport_enable_ms, .break_ctl = sport_break_ctl, .startup = sport_startup, .shutdown = sport_shutdown, @@ -765,8 +769,8 @@ return -ENOMEM; } - ret = peripheral_request_list( - (unsigned short *)pdev->dev.platform_data, DRV_NAME); + ret = peripheral_request_list(dev_get_platdata(&pdev->dev), + DRV_NAME); if (ret) { dev_err(&pdev->dev, "Fail to request SPORT peripherals\n"); @@ -812,10 +816,8 @@ res = platform_get_resource(pdev, IORESOURCE_IO, 0); if (res == NULL) sport->cts_pin = -1; - else { + else sport->cts_pin = res->start; - sport->port.flags |= ASYNC_CTS_FLOW; - } res = platform_get_resource(pdev, IORESOURCE_IO, 1); if (res == NULL) @@ -842,8 +844,7 @@ out_error_unmap: iounmap(sport->port.membase); out_error_free_peripherals: - peripheral_free_list( - (unsigned short *)pdev->dev.platform_data); + peripheral_free_list(dev_get_platdata(&pdev->dev)); out_error_free_mem: kfree(sport); bfin_sport_uart_ports[pdev->id] = NULL; @@ -862,8 +863,7 @@ if (sport) { uart_remove_one_port(&sport_uart_reg, &sport->port); iounmap(sport->port.membase); - peripheral_free_list( - (unsigned short *)pdev->dev.platform_data); + peripheral_free_list(dev_get_platdata(&pdev->dev)); kfree(sport); bfin_sport_uart_ports[pdev->id] = NULL; } @@ -883,7 +883,7 @@ }; #ifdef CONFIG_SERIAL_BFIN_SPORT_CONSOLE -static __initdata struct early_platform_driver early_sport_uart_driver = { +static struct early_platform_driver early_sport_uart_driver __initdata = { .class_str = CLASS_BFIN_SPORT_CONSOLE, .pdrv = &sport_uart_driver, .requested_id = EARLY_PLATFORM_ID_UNSET,