openwrt/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch
John Audia b4c02c9998 kernel: bump 5.4 to 5.4.73
Removed upstreamed patches:
 generic/pending-5.4
   445-mtd-spinand-gigadevice-Only-one-dummy-byte-in-QUA.patch
   446-mtd-spinand-gigadevice-Add-QE-Bit.patch
 pistachio/patches-5.4
   150-pwm-img-Fix-null-pointer-access-in-probe.patch

Manually rebased:
 layerscape/patches-5.4
   801-audio-0011-Revert-ASoC-fsl_sai-add-of_match-data.patch
   801-audio-0039-MLK-16224-6-ASoC-fsl_sai-fix-DSD-suspend-resume.patch
   801-audio-0073-MLK-21957-3-ASoC-fsl_sai-add-bitcount-and-timestamp-.patch
   820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch

All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
              mvebu (mamba, rango), x86_64, ramips/mt7621
Run-tested: ipq806x/R7800, mvebu (mamba, rango), x86_64, ramips (RT-AC57U)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[alter 820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-01 14:44:06 +01:00

30 lines
838 B
Diff

From 4dc6f2b9d454099445b8bc3a4a6328761335ce4d Mon Sep 17 00:00:00 2001
From: Fugang Duan <fugang.duan@nxp.com>
Date: Wed, 11 Sep 2019 16:23:25 +0800
Subject: [PATCH] tty: serial: fsl_lpuart: enable loopback mode
Enable lpuart32 loopback mode.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
---
drivers/tty/serial/fsl_lpuart.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1462,6 +1462,14 @@ static void lpuart32_set_mctrl(struct ua
temp |= UARTMODIR_TXCTSE;
lpuart32_write(port, temp, UARTMODIR);
+
+ temp = lpuart32_read(port, UARTCTRL);
+ if (mctrl & TIOCM_LOOP)
+ temp |= UARTCTRL_LOOPS;
+ else
+ temp &= ~UARTCTRL_LOOPS;
+
+ lpuart32_write(port, temp, UARTCTRL);
}
static void lpuart_break_ctl(struct uart_port *port, int break_state)