From patchwork Mon Jun 22 14:26:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 191337 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp1092925ile; Mon, 22 Jun 2020 07:27:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvgZ4JjDD/8sdF3kT5M+i6wCtEqyBdy8PBWpqj1IsvlAvLJwzFOna3T6kfEyohuj+KM5FX X-Received: by 2002:a50:8e1e:: with SMTP id 30mr6684836edw.283.1592836074723; Mon, 22 Jun 2020 07:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592836074; cv=none; d=google.com; s=arc-20160816; b=yVCw0v4UFSDXxRCPrbConnDp8XUHIHPvYvGOVTStWDm2vfb2EW+60iwTTvXGRZmDEJ kpzK2716gPzWX9U+4FBbhveGXOF0HPLYUKleUS/D49BwXFgNTNiniaEdwTZfFJLClZFB 2F52XfQNHMHGbwz0eIL1CpLaeTKY/L56a3nShnxsWwjL49DwcFe3WphKLAlz7JQcrmRh sqFUilaToLPKkCmzktyY4CT9WNA7801gGiXlPrpjDap+Eyictvq6gnMzRQhZY5MzzQ+j RWv0SvTRxEVto9/ckS8Pcn1p8FbiTNLuB61O4Vid/reUq7bg23asj2plsTQsKUWJGUTP blwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=M9KwMzs626zZhBtIoTQs5efdkplmNJ79hSzl8cSVNjw=; b=LBeh3sI0nDdfbaILLXIQkebADhDYtLQnH4iLefsSiZM4P1a4p05OEI3Q45IqxXewna XNCxNPKc1qh6Rie6OwMdoCS9gsBhRqo5zXGa9dLF3qJl+SPhDezIkFXIlPrdIPJN8OwD 4veTJpsfuAK2OfBVkpQCIcRp9dpPzBpnDBa5oCx7kzf4l31MuWkl8e3lzqn5OnZsBuyM MM0NX5MNPJ776oiOBcAOPF2OyualXnuhTwsvdQ9Tl2T7GCXt4wiTFUSq354RJ6uivmo2 UvxsKDzrRdJsoYsINWj5IBlmjK8fc5f9wTR2gI+mJmmNpc3W1pkaM6zaCuqcU5oxD5a2 /ZFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fcYOxIUy; spf=pass (google.com: domain of linux-serial-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si9037717ejr.344.2020.06.22.07.27.54; Mon, 22 Jun 2020 07:27:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-serial-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fcYOxIUy; spf=pass (google.com: domain of linux-serial-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729386AbgFVO1w (ORCPT + 1 other); Mon, 22 Jun 2020 10:27:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729812AbgFVO1v (ORCPT ); Mon, 22 Jun 2020 10:27:51 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F854C061795 for ; Mon, 22 Jun 2020 07:27:51 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id k6so7641502pll.9 for ; Mon, 22 Jun 2020 07:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=M9KwMzs626zZhBtIoTQs5efdkplmNJ79hSzl8cSVNjw=; b=fcYOxIUyQqvxk/LMxj5k2PcHWbKksWlVM0RADhm7nGAokdEUmwV3EEiZC6qY8FZN+u MXoiD9Bl8uV3mE4dflId5Ysj9kk2DyS+ixwUWTwMxgQNlEF/UXTDXHxh7aeIfq/mou+U eOEgNlbrFUBNwfhMfJmEyGzg5fmJfkUD5+UTEteGBQmEZK7I1tsSoxz7idIIF4PWOgEv 3wQpxAZvdSHhEhomUs3Z4VP2UfDdFTNS9ukNUxnLQOoybV0TbZMI9blZV8rUJ1CsWUdM EJwzGZlCgI6Rtzeeiy5wd0ZheSlc3cyB8kuXh84pgLq/xOC7zPeMMPf0jJb4+LZ6QsuT hT8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=M9KwMzs626zZhBtIoTQs5efdkplmNJ79hSzl8cSVNjw=; b=O9sJcF0mPghMqch6Bto2p1tJrxVlp3XYU96nw2LeMDfcb6Hn8/d+nP9JguHnh4Gm+f R5P7eAvh7YtWgFLtVYQqTsa0ay3ybMuz6sHPdj+CUo5GLQgtdG9G9wMxyktO8PWdIraz V+dDDXQICs5mcd+LDjtbdz4PLVJ/ESI47BZ/9lNeJ8YFg2mXdmhZS4nwGPtLBKSJs8o8 57c4z75QrY7fwlEYbW0ZIrRrWj1vUpWt7ey+4IxXFj4S5YjvOdLgce/5iq+Hbim/NQ7e N/gmwtIkApXTkE6cbYxF1AUtN/h4vd0NUWgb6Yo45u3ZKyAorO1q2p6hIYGr9d7lLUEE Tg7g== X-Gm-Message-State: AOAM531c3PgR52XFv4PDYFLF9U7E3Zo9LHNW4jNy4p/J6P8l8gsTsVd4 +1o+/tsKAEYpqxsntHqz+aHCpQ== X-Received: by 2002:a17:902:d903:: with SMTP id c3mr18839486plz.229.1592836070328; Mon, 22 Jun 2020 07:27:50 -0700 (PDT) Received: from localhost.localdomain ([117.252.67.186]) by smtp.gmail.com with ESMTPSA id d6sm14547939pjh.5.2020.06.22.07.27.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2020 07:27:49 -0700 (PDT) From: Sumit Garg To: kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, daniel.thompson@linaro.org, jason.wessel@windriver.com, dianders@chromium.org, jslaby@suse.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, Sumit Garg Subject: [PATCH 6/7] serial: amba-pl011: Implement poll_get_irq() interface Date: Mon, 22 Jun 2020 19:56:23 +0530 Message-Id: <1592835984-28613-7-git-send-email-sumit.garg@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592835984-28613-1-git-send-email-sumit.garg@linaro.org> References: <1592835984-28613-1-git-send-email-sumit.garg@linaro.org> Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 --- drivers/tty/serial/amba-pl011.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.7.4 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 };