mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-11 20:03:31 +00:00
TTY/Serial driver fixes for 6.4-rc5
Here are some small tty/serial driver fixes for 6.4-rc5 that have all been in linux-next this past week with no reported problems. Included in here are: - 8250_tegra driver bugfix - fsl uart driver bugfixes - Kconfig fix for dependancy issue - dt-bindings fix for the 8250_omap driver Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZHxD4w8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ykcTQCdGohhrEfOmNVDGnYHTTCZ7NXgjX4AoJkqRjsT pp6mxqTNLHy/NQqjboUR =O/xg -----END PGP SIGNATURE----- Merge tag 'tty-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are some small tty/serial driver fixes for 6.4-rc5 that have all been in linux-next this past week with no reported problems. Included in here are: - 8250_tegra driver bugfix - fsl uart driver bugfixes - Kconfig fix for dependancy issue - dt-bindings fix for the 8250_omap driver" * tag 'tty-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: dt-bindings: serial: 8250_omap: add rs485-rts-active-high serial: cpm_uart: Fix a COMPILE_TEST dependency soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK serial: 8250_tegra: Fix an error handling path in tegra_uart_probe()
This commit is contained in:
commit
12c2f77b32
@ -70,6 +70,7 @@ properties:
|
|||||||
dsr-gpios: true
|
dsr-gpios: true
|
||||||
rng-gpios: true
|
rng-gpios: true
|
||||||
dcd-gpios: true
|
dcd-gpios: true
|
||||||
|
rs485-rts-active-high: true
|
||||||
rts-gpio: true
|
rts-gpio: true
|
||||||
power-domains: true
|
power-domains: true
|
||||||
clock-frequency: true
|
clock-frequency: true
|
||||||
|
|||||||
@ -36,7 +36,7 @@ config UCC
|
|||||||
config CPM_TSA
|
config CPM_TSA
|
||||||
tristate "CPM TSA support"
|
tristate "CPM TSA support"
|
||||||
depends on OF && HAS_IOMEM
|
depends on OF && HAS_IOMEM
|
||||||
depends on CPM1 || COMPILE_TEST
|
depends on CPM1 || (CPM && COMPILE_TEST)
|
||||||
help
|
help
|
||||||
Freescale CPM Time Slot Assigner (TSA)
|
Freescale CPM Time Slot Assigner (TSA)
|
||||||
controller.
|
controller.
|
||||||
@ -47,7 +47,7 @@ config CPM_TSA
|
|||||||
config CPM_QMC
|
config CPM_QMC
|
||||||
tristate "CPM QMC support"
|
tristate "CPM QMC support"
|
||||||
depends on OF && HAS_IOMEM
|
depends on OF && HAS_IOMEM
|
||||||
depends on CPM1 || (FSL_SOC && COMPILE_TEST)
|
depends on CPM1 || (FSL_SOC && CPM && COMPILE_TEST)
|
||||||
depends on CPM_TSA
|
depends on CPM_TSA
|
||||||
help
|
help
|
||||||
Freescale CPM QUICC Multichannel Controller
|
Freescale CPM QUICC Multichannel Controller
|
||||||
|
|||||||
@ -113,13 +113,15 @@ static int tegra_uart_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
ret = serial8250_register_8250_port(&port8250);
|
ret = serial8250_register_8250_port(&port8250);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto err_clkdisable;
|
goto err_ctrl_assert;
|
||||||
|
|
||||||
platform_set_drvdata(pdev, uart);
|
platform_set_drvdata(pdev, uart);
|
||||||
uart->line = ret;
|
uart->line = ret;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_ctrl_assert:
|
||||||
|
reset_control_assert(uart->rst);
|
||||||
err_clkdisable:
|
err_clkdisable:
|
||||||
clk_disable_unprepare(uart->clk);
|
clk_disable_unprepare(uart->clk);
|
||||||
|
|
||||||
|
|||||||
@ -762,7 +762,7 @@ config SERIAL_PMACZILOG_CONSOLE
|
|||||||
|
|
||||||
config SERIAL_CPM
|
config SERIAL_CPM
|
||||||
tristate "CPM SCC/SMC serial port support"
|
tristate "CPM SCC/SMC serial port support"
|
||||||
depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST)
|
depends on CPM2 || CPM1
|
||||||
select SERIAL_CORE
|
select SERIAL_CORE
|
||||||
help
|
help
|
||||||
This driver supports the SCC and SMC serial ports on Motorola
|
This driver supports the SCC and SMC serial ports on Motorola
|
||||||
|
|||||||
@ -19,8 +19,6 @@ struct gpio_desc;
|
|||||||
#include "cpm_uart_cpm2.h"
|
#include "cpm_uart_cpm2.h"
|
||||||
#elif defined(CONFIG_CPM1)
|
#elif defined(CONFIG_CPM1)
|
||||||
#include "cpm_uart_cpm1.h"
|
#include "cpm_uart_cpm1.h"
|
||||||
#elif defined(CONFIG_COMPILE_TEST)
|
|
||||||
#include "cpm_uart_cpm2.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SERIAL_CPM_MAJOR 204
|
#define SERIAL_CPM_MAJOR 204
|
||||||
|
|||||||
@ -1495,34 +1495,36 @@ static void lpuart_break_ctl(struct uart_port *port, int break_state)
|
|||||||
|
|
||||||
static void lpuart32_break_ctl(struct uart_port *port, int break_state)
|
static void lpuart32_break_ctl(struct uart_port *port, int break_state)
|
||||||
{
|
{
|
||||||
unsigned long temp, modem;
|
unsigned long temp;
|
||||||
struct tty_struct *tty;
|
|
||||||
unsigned int cflag = 0;
|
|
||||||
|
|
||||||
tty = tty_port_tty_get(&port->state->port);
|
temp = lpuart32_read(port, UARTCTRL);
|
||||||
if (tty) {
|
|
||||||
cflag = tty->termios.c_cflag;
|
|
||||||
tty_kref_put(tty);
|
|
||||||
}
|
|
||||||
|
|
||||||
temp = lpuart32_read(port, UARTCTRL) & ~UARTCTRL_SBK;
|
|
||||||
modem = lpuart32_read(port, UARTMODIR);
|
|
||||||
|
|
||||||
if (break_state != 0) {
|
|
||||||
temp |= UARTCTRL_SBK;
|
|
||||||
/*
|
/*
|
||||||
* LPUART CTS has higher priority than SBK, need to disable CTS before
|
* LPUART IP now has two known bugs, one is CTS has higher priority than the
|
||||||
* asserting SBK to avoid any interference if flow control is enabled.
|
* break signal, which causes the break signal sending through UARTCTRL_SBK
|
||||||
|
* may impacted by the CTS input if the HW flow control is enabled. It
|
||||||
|
* exists on all platforms we support in this driver.
|
||||||
|
* Another bug is i.MX8QM LPUART may have an additional break character
|
||||||
|
* being sent after SBK was cleared.
|
||||||
|
* To avoid above two bugs, we use Transmit Data Inversion function to send
|
||||||
|
* the break signal instead of UARTCTRL_SBK.
|
||||||
*/
|
*/
|
||||||
if (cflag & CRTSCTS && modem & UARTMODIR_TXCTSE)
|
if (break_state != 0) {
|
||||||
lpuart32_write(port, modem & ~UARTMODIR_TXCTSE, UARTMODIR);
|
/*
|
||||||
} else {
|
* Disable the transmitter to prevent any data from being sent out
|
||||||
/* Re-enable the CTS when break off. */
|
* during break, then invert the TX line to send break.
|
||||||
if (cflag & CRTSCTS && !(modem & UARTMODIR_TXCTSE))
|
*/
|
||||||
lpuart32_write(port, modem | UARTMODIR_TXCTSE, UARTMODIR);
|
temp &= ~UARTCTRL_TE;
|
||||||
}
|
|
||||||
|
|
||||||
lpuart32_write(port, temp, UARTCTRL);
|
lpuart32_write(port, temp, UARTCTRL);
|
||||||
|
temp |= UARTCTRL_TXINV;
|
||||||
|
lpuart32_write(port, temp, UARTCTRL);
|
||||||
|
} else {
|
||||||
|
/* Disable the TXINV to turn off break and re-enable transmitter. */
|
||||||
|
temp &= ~UARTCTRL_TXINV;
|
||||||
|
lpuart32_write(port, temp, UARTCTRL);
|
||||||
|
temp |= UARTCTRL_TE;
|
||||||
|
lpuart32_write(port, temp, UARTCTRL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpuart_setup_watermark(struct lpuart_port *sport)
|
static void lpuart_setup_watermark(struct lpuart_port *sport)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user