[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1592835984-28613-7-git-send-email-sumit.garg@linaro.org>
Date: Mon, 22 Jun 2020 19:56:23 +0530
From: Sumit Garg <sumit.garg@...aro.org>
To: kgdb-bugreport@...ts.sourceforge.net, linux-serial@...r.kernel.org
Cc: gregkh@...uxfoundation.org, daniel.thompson@...aro.org,
jason.wessel@...driver.com, dianders@...omium.org, jslaby@...e.com,
linux@...linux.org.uk, linux-kernel@...r.kernel.org,
Sumit Garg <sumit.garg@...aro.org>
Subject: [PATCH 6/7] serial: amba-pl011: Implement poll_get_irq() interface
Support kgdb NMI console feature via implementing poll_get_irq()
interface. This will allow usage of RX interrupts to support kgdb entry
while serial device is operating in polling mode.
Signed-off-by: Sumit Garg <sumit.garg@...aro.org>
---
drivers/tty/serial/amba-pl011.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index c010f63..d620d12 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1637,6 +1637,16 @@ static void pl011_put_poll_char(struct uart_port *port,
pl011_write(ch, uap, REG_DR);
}
+static int pl011_get_poll_irq(struct uart_port *port)
+{
+ struct uart_amba_port *uap =
+ container_of(port, struct uart_amba_port, port);
+
+ pl011_write(UART011_RTIM | UART011_RXIM, uap, REG_IMSC);
+
+ return uap->port.irq;
+}
+
#endif /* CONFIG_CONSOLE_POLL */
static int pl011_hwinit(struct uart_port *port)
@@ -2145,6 +2155,7 @@ static const struct uart_ops amba_pl011_pops = {
.poll_init = pl011_hwinit,
.poll_get_char = pl011_get_poll_char,
.poll_put_char = pl011_put_poll_char,
+ .poll_get_irq = pl011_get_poll_irq,
#endif
};
@@ -2176,6 +2187,7 @@ static const struct uart_ops sbsa_uart_pops = {
.poll_init = pl011_hwinit,
.poll_get_char = pl011_get_poll_char,
.poll_put_char = pl011_put_poll_char,
+ .poll_get_irq = pl011_get_poll_irq,
#endif
};
--
2.7.4
Powered by blists - more mailing lists