Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2806417ybt; Mon, 22 Jun 2020 07:30:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwp3t1mB2HX/CuNTzOX57XJg8ZgEooPKdMJD0zIp1cFQz1cR2ZY0/WACgJwenfRbGoEjYcp X-Received: by 2002:a17:906:edd8:: with SMTP id sb24mr15547313ejb.25.1592836243968; Mon, 22 Jun 2020 07:30:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592836243; cv=none; d=google.com; s=arc-20160816; b=n8pWBdheh1COd6IWppcXA+c6uUxGUrE58iIBdmOZ/nQ/pRaeHBuNg8NipTldpncfCR 2tGkJLnUatfeAYWcROZBs8q4eedTOo3qFZeAdkwq9PEkIG7Z9LtqK6ijDGUaYcSim5kh TYFvmTxfUnt497UnJf52VLC1UyXfTFom6HqLXY4GAo6ys3XUi82vS1O4SlLjlZd82p7q k73PK+odC44FbIddPDrm5N/dxFsiQstQkAr36OxxDYCBitEVoI2FSPAZzNdDe5oQCiUH OMesPp7n6HgRHZuo4YrOPZWanD6tjXfKBQMD/ljhP3MkGmZTTMgO/yTnAGOZ0Ih6PA5/ hHrg== 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=Yxx2+AdG1TTAkIiv0F0DbdC/OIXW2SN/0hkU1925puLeuGSAwt026Zt24lEDCreeC4 IIbHfHpDg90+Ft5M3hyjqhH6NJITKC731a77G7i4f8XDCNTIN9UTvx94YKzLQlEmrdBj TTrRxWzIupHhvU2aDb0pWkghLZoOUWbd7oF12YZp4HRT2R+1eHpmgut4qgVYD5TV/EGz PaMWI6sMoevfOUEj6daM9lP1Pum3Xyen1cJC35HkaZ4vinh4+r11ekiIH96jNGTXi/BR LFQuW13zBLOj/E7gVj2wpRJ1b2RWkgKzj1ytsCyiP5OmfsoI7QNjzJzxMZGJIEHoTBnN XAwg== 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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 l5si8648951edn.474.2020.06.22.07.30.21; Mon, 22 Jun 2020 07:30:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1729462AbgFVO1y (ORCPT + 99 others); Mon, 22 Jun 2020 10:27:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729813AbgFVO1v (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 1F60EC061573 for ; Mon, 22 Jun 2020 07:27:51 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id x11so7649264plo.7 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=UpQAOWKOCLO7XWlhKhwfuoOhIamOjnf2c9JKCQRhpSSTV4wO9cu++rY4PS3ED8gVJz 0UtTh7VILegq23oX35hPhyK/3lWRSSnhipY+zBIYn/ukSoWwhFgTNxD2HkyaKWs2iIeQ g6s51pd6tUnlxAA4gUWC6V2fU2A4cUibz8G9nEc5j3HzkKgi1kme8aCwkHHBz946SHyE C+DAzAUkENfWlfmkDuTEiexIKFzB13EYlc1YCsK+ACcvOmoD9QludRT/PuFkKWr2MegQ mxH1DKljaYvVPKDM1gGfznJ/QcaxICRBLHFFi7n4yAMG5P1luKONqQrliPgRUYdMak45 ZxCg== X-Gm-Message-State: AOAM533A1iIb8cda7n3kPHxdkmBkR7lfTx/qHfWwXom5YgnY/H4NAfdG kWdNqOXZVt1GzG+peKR51FLRyw== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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