Paulius Zaleckas | 24 Sep 15:05

[PATCH] 8250: Add UPF_NO_EFR flag

Gemini SoC UART has aditional prescaler register at the same
address as EFR accessible only when DLAB=1.
We need this flag for autodetection to work correctly.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas <at> teltonika.lt>
---

 drivers/serial/8250.c       |   12 +++++++++---
 include/linux/serial_core.h |    1 +
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 9ccc563..0ca1f9d 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -843,6 +843,9 @@ static void autoconfig_16550a(struct uart_8250_port *up)
 	up->port.type = PORT_16550A;
 	up->capabilities |= UART_CAP_FIFO;

+	if (up->port.flags & UPF_NO_EFR)
+		goto skip_efr;
+
 	/*
 	 * Check for presence of the EFR when DLAB is set.
 	 * Only ST16C650V1 UARTs pass this test.
@@ -872,6 +875,7 @@ static void autoconfig_16550a(struct uart_8250_port *up)
 		return;
 	}

+skip_efr:
(Continue reading)


Gmane