From patchwork Mon Jan 30 06:44:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sherry Sun X-Patchwork-Id: 648887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6C28C54EAA for ; Mon, 30 Jan 2023 06:47:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235694AbjA3Grx (ORCPT ); Mon, 30 Jan 2023 01:47:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235851AbjA3Grv (ORCPT ); Mon, 30 Jan 2023 01:47:51 -0500 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2072.outbound.protection.outlook.com [40.107.7.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C27B16329; Sun, 29 Jan 2023 22:47:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sz9oz35GHgIMCanF0cR3wOZqs4VKyx7X4OTUxknXWAxDdjgpn0BbKkncQAE1e85xeTi8wH0jk2L9X0hiPy9YHAEjKd8MS+sdWkAxp6THMa0fllZqDZsZnGWeQeDmgi6P6gzGztbkEyVYgfIAX2HKBoQ2JUxZkC7ttxCT07g/r5nVDe38lPf+3tzwNihr5eyGgbWTS+ouzTB1DJlKskamFmoSRyLnHAYaLSn2QZSvMNppqayuU1yW+Baon4wf0H0z/qh4uMbavoacWeJUc9mHMIblWwG4DbCE1MC2lRI5wBh8GOtC/pZhoa0K1EnlJDh737NZIAuEJVNVXRxZnZRAFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PZgKhBwcW4L8V6MPAjx2fE/0uMYGx/YEBhDyNo4B4Mg=; b=aNpV6JqcDQdL7eCTaj6XQXYbKqI1CGqE2dkExahnfTxCIILkOoQRpu9BghmNB+OCJGc1Usv3oyWOR9nRT5rrvcu5iUY378YwzIm5RGuauna/oqiDOJHz2E+PU8eG/JMfj9vz56dva9my8rc65Fn1klLD/cPT91nbMUR1fSHTCJJEzSftMdHQuPioJ65dqWmjwEGcz9SnOFlPBYWZk0p2SSSQwwcQUwpIaYjmhYlx6WlajqVPEGmVf0Qey4ObMXPn88PKk6IC83LuQEPlHzEl5ag12NcwZU2EL0pUwJ/h9GY6Ils25a7z7nRYNSpXjv2bYU8UZWPiJ9GiY24PY46DWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PZgKhBwcW4L8V6MPAjx2fE/0uMYGx/YEBhDyNo4B4Mg=; b=YFP9XmrJsr67DH5YrO/eQJ18STQxVydUfp65yOsMq4qCqtMCTInEHcSRZNkBfBZXxdWbQUpmcvsYbgZQdrjd5PP3NONH/3d5UPo1sGdTHxoPnTD0LYq31NWaXGXJNdxb/pVT6UQdl7XiXrzg+geQpkh5K5qZWVFNKoo8z1Elk9o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) by PR3PR04MB7289.eurprd04.prod.outlook.com (2603:10a6:102:8a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.33; Mon, 30 Jan 2023 06:47:32 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::7f24:bc0a:acd4:b13f]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::7f24:bc0a:acd4:b13f%9]) with mapi id 15.20.6043.036; Mon, 30 Jan 2023 06:47:32 +0000 From: Sherry Sun To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH 1/6] tty: serial: fsl_lpuart: make rx_watermark configurable for different platforms Date: Mon, 30 Jan 2023 14:44:44 +0800 Message-Id: <20230130064449.9564-2-sherry.sun@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230130064449.9564-1-sherry.sun@nxp.com> References: <20230130064449.9564-1-sherry.sun@nxp.com> X-ClientProxiedBy: SI2PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:194::22) To AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8404:EE_|PR3PR04MB7289:EE_ X-MS-Office365-Filtering-Correlation-Id: 561faa10-2822-4347-ac25-08db028ddc75 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: II0VQrovt8VBv3AWLlMfweev1MZrXpOijT5yDbpvIqIszn9gtcasOfdpSzqKQ392zo7Ks7swaz6BOT1gR0IlrzErfWVFVEAnHAZHTMB+jGcMK8s5wK7lgrxmUI7IFi1YqqaCemY1hsH5tmHgkcnQi9/UzTsU8st4Kjgn1UCRlhpzMlA9QjY5r2UTJFDrctoIdLV4uzlnGuqac2kjQ7zPnIzBJALHjJtM8O1JTGRYw5Va884+o8wJLptpAppbxwkb4tYDu33OUevBiaebVcXWoD16IeJdc6V0z66ur7KBzHutS9VlHt24bYxDwcjXKD0HNbpjAe/5SP/IFG4sGPkS8HhdsF5wPrP+1utjXxJQXkezaNi/tiMXTemEll8ZHDJlj/os33pvGtqy2LQBdQcVY7ggKclZ/GykNqy+DArTUT5j5J3Vg4+J9+dI6KMi0jirEdVMPvTbXNfcRCuo/9hl4Xir1n3YnIP65fiekxh+a8z0N7xxDAl4+fNGkUX+2f7ujNRL3Pwl7sS7z6Ubt70CfIfSAsmlC8eFYB+WCfAqjH0uO5YdgZrUMSiKFTzsvbCEIya6bMwAg5f4IZaF6kn9h2N2WThLGIm5JjiCFLpzSI1b4PWsZQq8D97DVYlLiN5xoi40Kx9+MPV08Co5raJgM6JkCarFC84rbSt4pGpYL2G6bO4DdUBXudoep3RJo3A/TyEqBPiPqK+XzvrRPBv1kw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8404.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(376002)(346002)(396003)(366004)(136003)(451199018)(38100700002)(86362001)(38350700002)(36756003)(41300700001)(2906002)(6666004)(478600001)(52116002)(6486002)(8936002)(5660300002)(316002)(66946007)(4326008)(8676002)(44832011)(2616005)(83380400001)(26005)(66556008)(6512007)(186003)(1076003)(6506007)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jL93J0FAUsCjCWlJFZOu+MNKcBv9GPhFKaYNIQFZYgMUVJfLfi36GFQHdTX9VEMOIO7W43n701Bemg+WpKmuiyBdUqu+vMJf9/OpMQDG4FiKWUpmqr6S0MKh2p2/8V+8Idr+NMnSc3FAnGOzQleKfiT0uQeUw84MR+3nDhRr9+up9nGKa6arXeO492xOVjRA42EU6VHFBKTbWcwA3O4J5LWlcy2IkDH+51egpjqSuxFZOAPefHZcs7BU+AttnaDmnwrLfUwBl2GHs5Bpl2iZmaGaMQBbRWTvbb//PRqxXKQRv92PLFpR0Q8r46ZSWz4svwtk8C4CBl/FXp/uMgL2pmtMZjtxf6hHQXWQgfxZJsLgJfrzn/WKzv67UFbPjFlQAN8g3iRT+1ty/qmyvC6mRoS2fYJZOqDO5W70Y2yJk7MIoAizWuKFaQKutANJho2FXeN89RhmkyxgN6fdZMkuWfha3ALfLcgWQdowtaUG3VE2erimZ+rlLBiBnWLwaJYCHBTCO7BptfPoacZeOdGL32UDDxJO5HVnm3ESFmZGcOSD6Mj4ZedS6texcgJxWYX7yy07Fc3ai8yKWm4Mh/pZO0HjICWyk8TREOMvH62Wk4pwLp2M+pFQ1Tux6TYbSAkAZEC7+OR0QP5YxMiHd/P3lVLics4HyVQDFvu5YL+tjkGo/DZy4cH+0wVaBKZt9aUNmLBR39C4kIFpth3zw5t6kDJDJtgLiKZTJ4/C/Kre33yE+YmPpiajRckX0orjW1xN/IB2Cicirej+/mxa9gS40BK1KuhqvRu09HyXfgFDCgeagZuMEIzpZ8xTtPatyzcu8PXFd67uxP+UYpVh41pQTAsHFMPIOBX0+3wOKRlzc5U6BdHTGXzq1GDyps7ho95ywuxIoaaKSDX1+6JiiqcZ5BcpWnEZnQCbib7gWiVLUzZkTi0KlApYo4Z+PDexOMZNDkvlUsflXFhYrIrI+21oMD3pSYgxYu9PDEnyzyNbivHBTzkYn+5L7RlWD5Ei3xaLPncWa9EqmNG267JN0S7yu0rmLjCYckr8aZmFzSOqUDJntJ3vEm6rqR9fLTuN/CaFqf8yL99OAzkfarqSbOW9de6GOzmQsq5PbPDVZ/g15+96tYQenqW29AhvO9uI2gXX2EN9sYLk89WaJ2murUYs+zMAHI9GV/v3koBt4DAVSI1WJqnQ7Os5UYTVURfc6xqvMHLUTKitWOGFBAKBmGZXooj2B5D3GckCQphxHrtqNYEBVjsdKJyRAP4Sgxs3rqcNdZaQHTioEKJ44SsxkyDZQkE/I6PsFjofzgGICSYk0ZizHe24+3ndeDv+VfNbcrEaR6FVi5R/78jVmqMxpj9nIly/lL7WpWe9UKxN4f4otY+eWFPzQ6uQjXa7OhTv9DFpZ8FESDa5YZ1o24sY2SVgLdbAQYOhpPsS0W49fl1R9HghQuA1jSTpsq00Of3/TA7T96luF6klMRNDSWrRdMcPG/WoiQgp5n5blj/9bQEQeoRB4+F/X3Oe/RBnx2QAS6yedkriBDy38ro2oF3mjXBtFmhxjQsSCsNY6MXHvvHrTVu2Ba5lqANi9Brvn/Vi2cpF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 561faa10-2822-4347-ac25-08db028ddc75 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2023 06:47:31.9462 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0zh27pbEfi2KCR/jVvaSszffWO00MpYljhLYON8/S/kAxnOUIZWyTlJT2NT81EvurB9voTagW3Ath4b0j9E2mQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7289 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Add rx_watermark parameter for struct lpuart_port to make the receive watermark configurable for different platforms. No function changed. Signed-off-by: Sherry Sun --- drivers/tty/serial/fsl_lpuart.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index eac5243a9db0..e4aa161e61bf 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -262,6 +262,7 @@ struct lpuart_port { unsigned int txfifo_size; unsigned int rxfifo_size; + u8 rx_watermark; bool lpuart_dma_tx_use; bool lpuart_dma_rx_use; struct dma_chan *dma_tx_chan; @@ -288,38 +289,45 @@ struct lpuart_soc_data { enum lpuart_type devtype; char iotype; u8 reg_off; + u8 rx_watermark; }; static const struct lpuart_soc_data vf_data = { .devtype = VF610_LPUART, .iotype = UPIO_MEM, + .rx_watermark = 1, }; static const struct lpuart_soc_data ls1021a_data = { .devtype = LS1021A_LPUART, .iotype = UPIO_MEM32BE, + .rx_watermark = 1, }; static const struct lpuart_soc_data ls1028a_data = { .devtype = LS1028A_LPUART, .iotype = UPIO_MEM32, + .rx_watermark = 1, }; static struct lpuart_soc_data imx7ulp_data = { .devtype = IMX7ULP_LPUART, .iotype = UPIO_MEM32, .reg_off = IMX_REG_OFF, + .rx_watermark = 1, }; static struct lpuart_soc_data imx8qxp_data = { .devtype = IMX8QXP_LPUART, .iotype = UPIO_MEM32, .reg_off = IMX_REG_OFF, + .rx_watermark = 1, }; static struct lpuart_soc_data imxrt1050_data = { .devtype = IMXRT1050_LPUART, .iotype = UPIO_MEM32, .reg_off = IMX_REG_OFF, + .rx_watermark = 1, }; static const struct of_device_id lpuart_dt_ids[] = { @@ -1520,7 +1528,7 @@ static void lpuart_setup_watermark(struct lpuart_port *sport) } writeb(0, sport->port.membase + UARTTWFIFO); - writeb(1, sport->port.membase + UARTRWFIFO); + writeb(sport->rx_watermark, sport->port.membase + UARTRWFIFO); /* Restore cr2 */ writeb(cr2_saved, sport->port.membase + UARTCR2); @@ -1555,7 +1563,8 @@ static void lpuart32_setup_watermark(struct lpuart_port *sport) lpuart32_write(&sport->port, val, UARTFIFO); /* set the watermark */ - val = (0x1 << UARTWATER_RXWATER_OFF) | (0x0 << UARTWATER_TXWATER_OFF); + val = (sport->rx_watermark << UARTWATER_RXWATER_OFF) | + (0x0 << UARTWATER_TXWATER_OFF); lpuart32_write(&sport->port, val, UARTWATER); /* Restore cr2 */ @@ -2731,6 +2740,7 @@ static int lpuart_probe(struct platform_device *pdev) sport->port.dev = &pdev->dev; sport->port.type = PORT_LPUART; sport->devtype = sdata->devtype; + sport->rx_watermark = sdata->rx_watermark; ret = platform_get_irq(pdev, 0); if (ret < 0) return ret; From patchwork Mon Jan 30 06:44:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sherry Sun X-Patchwork-Id: 648886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D5F3C54EAA for ; Mon, 30 Jan 2023 06:48:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235914AbjA3GsX (ORCPT ); Mon, 30 Jan 2023 01:48:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235854AbjA3Gry (ORCPT ); Mon, 30 Jan 2023 01:47:54 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2044.outbound.protection.outlook.com [40.107.21.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4199944B8; Sun, 29 Jan 2023 22:47:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bo4NyXcfXQm8gpH3KDajZXQvirV8qVLjhgzPrJPgH5iIFPq8QYOy+53rlwCFliNq6pR4CbQ3XssaWwoe3+QhE+hGjYMSxJsqKOAtJX8FeMeCsLsAU902p/wyZrnTa61OjOcfFhLMJo1C7iGD2gBLM7Evx7ly2HKfDzLBT0twByI1w/v+K3ENBUGeDj5w8P+VMH48/mITo6GbKb3TMZ9JKpwIyeqQRyuK/YEDjusEP64jCsm/YFBTqXY8L902XeVBiBpZQTVm3MswyiIeUoAuMrgCUb7N9tMb3o5hUpsOK6+FgCxBaKdSI7HGQLgPvPWVNhanuqww6oVpa8SwVcyBBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jgY1VOdfacmuJ2RUs1jsVcpi7vxYdSiAdaIDNiAz4wc=; b=VknpQpjbfjE5iBXjOWcHXTzKiiOMsV9bMULOHBI0bbew1plKiAkzD4BMWxzGI4xOsb/OADuoVGEMNSgPbcDSLdV4LO6WEvzRQV4PmZBAbIdOh53DIafjSWkBEKiyt22Ktk5MdpPNwX4kIvpNu2Pc6ILMy4uULV6w1CjBh46YlrH+M4UUIRNgwvuja+YRQ5LEQoitNaFk8iVK+aWsmEPJ6f/+LyFAWYkfwqRxo3qbzotomLx6yMwpHf4GxALjYklzaZyovpo4+6SxW4h3ET6wNQO3NFgKXy0CSevIWI9yHDZCzxe6kh85TQbsm/PbtbtpsKbRth80tpeKOnGrHHWa3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jgY1VOdfacmuJ2RUs1jsVcpi7vxYdSiAdaIDNiAz4wc=; b=cG96OggQpSvMkx3Ihsve1Wsyfkv94dGqit7U68x6bF2DSvtboCGv4i7+PTUybh71G3HnC0wNqi3DtL3ao273c4ohjZXakiddTAa0UFBJiaiBKjW/C9/yx81vyYoh0yAGaB4zIWKnjtBl32BsESfN9j5w/DIN6TwHx00UVN94odA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) by PR3PR04MB7228.eurprd04.prod.outlook.com (2603:10a6:102:8c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.36; Mon, 30 Jan 2023 06:47:45 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::7f24:bc0a:acd4:b13f]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::7f24:bc0a:acd4:b13f%9]) with mapi id 15.20.6043.036; Mon, 30 Jan 2023 06:47:45 +0000 From: Sherry Sun To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH 4/6] tty: serial: fsl_lpuart: Enable Receiver Idle Empty function for LPUART Date: Mon, 30 Jan 2023 14:44:47 +0800 Message-Id: <20230130064449.9564-5-sherry.sun@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230130064449.9564-1-sherry.sun@nxp.com> References: <20230130064449.9564-1-sherry.sun@nxp.com> X-ClientProxiedBy: SI2PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:194::22) To AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8404:EE_|PR3PR04MB7228:EE_ X-MS-Office365-Filtering-Correlation-Id: bf4a3a99-c2b2-4fe9-1291-08db028de482 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uAGL8LuH3A3nbr6qEk68T9ji4fhlQ0FCbMyynIpvSuM7T7UFobrpmzW5RwqwIota5IdC9DjjWhEjuEW6uT/TxfiW2NjrZB1n/EmNydeVfZXyo2u9IU1065LgQVJB6Pmk3+WhidzFoppdAMUaOkn3MM/Mr38YjkPIOSl4MiZvYQwqynMcFxAm77AFT+FBL//t+1CpBDA7mEfqiG4q8w5cMPfnyy82xTK/7Ql75znxc1lfLEvAaXbUUSQCEVFXSEoMgtWtRNsZPZkxagybXj/M9YW5Mytcpuneq7FqTj8tVhm7k9ll7jUJeb4EWBVgloscTwvdJwaF2nEkDkxMabtoYJwTPStOVrI+RsK2RqNbhKEK9F1WBHdVeU3Lirlg59MY52nd1bDGH2Edh43BM+vbBVdz9CVlG6gDmMnC4m54P+wYHMDx04tBELQfi6+rSPgp+YjjluQh2kKOTK4baMvooKGK9y2AEUtjYOKQZCJWOI2QozEgNvRL9VwNgkk9PsdaKlIrdUg/Tislandv+/C6pgeINonmdrNyzu178MxyjjOYyE0jYzlGImWCnx1KbM72VUJDTgDRRH+OR2eMI8XoC7HYP2+UHFOgI1uX6kX54mtLjYhVU452Fn4g11pguWpcT9faqBM7vHppO56/DfK8GgPig+lj5ZF1lqCOuUzMrU6I6rRhogyh/OB8HAECc4T9DBiZlC//3phEPT2zSog13w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8404.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(346002)(376002)(39860400002)(396003)(136003)(366004)(451199018)(8936002)(41300700001)(44832011)(5660300002)(66556008)(83380400001)(38350700002)(38100700002)(86362001)(6486002)(36756003)(52116002)(316002)(4326008)(66946007)(66476007)(8676002)(478600001)(2616005)(186003)(6512007)(26005)(6506007)(1076003)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nSl3izzVnK6VpUT8Y6Qrwsdb3uqdaJp7bGJyMHk3xZZYqyTXLw4NGpQK7rbJdFiZsQZiOsGsaQ5bvqNdjnDOFuEQZI7faPOxtwr7wk7Ylnl+0i8SmtZhklkRDg9XMk7I2fc7GcN4oTf48ifC9LvevI2ajORTbvHXs8DDimAQr6Ic4TNFC3jXcUiGp7v6l0vg+L0/AovMqfyR5XlIoQ8KJxm6UxsXZ78VFz0fbAxL/RNHlvdo1FdSxc2aU2KDYDDmg5a4c9VwjNrj3Ake5bkpajcW0XEZfEkoSmyGM/vsZst9vgbSd9Daz5C/hmxT258uEH8CZSfjoat1mEBFnJ7BwTMhvHKEQNmZ1Po0idfvedE5Q8I04shp23OzpclNkN1qb4nFIr19Q9Tq8oWuozCKU3Uj4w2++VlIZNU3khJ0Wa86zUspU9WP0VNXpEE/XiQe2hAXNFWePz1Rc8ikVEBvSc/h6nPK67zpemke/IfNsru9pqtarpZfss7hh0uppGJw7S57isIbskFXW19r1emY6l0a1as+XlubO3y71zpLOe8D8c9M1qGQSvam1GYUCanZ3sdols7ntVDReXL0jhfx+L/HTxcKT7VKGxVGeyMpUH4m2lE+gTGmAVOreKoRV2o4y7Hn9y9pH6l49pQyQqSdUwH8u7xQnNPHX8D+1bINq/d1IR+sxhX6g5tlJKCkN8yJJ3jc9sGNC6pP327cu33MMsaWHzQaMIq0rsAlOahDgwAAkfKBRfvswZVZF64EhWzdHCFotI/a2n532p5PKcPI/eBUKcrRYU5d9w2N+e9FGXaJqVzRVOQoSpeT6nhOonLMnieQuH4ZEmMXaHahI44mRcu6YOdEkBETu0e+cPLj8U0SAWgcpAihfgXNvh9oQxF9H5hHNjHCm58pOv/PTygHO5jmTZqunEFd2+2f56i9wGnXTnz1j55z3I5gS1ZCoFD7U9PECo+uxXT7ucp1cGvKHQh2shsvJnNh5DnDbzWYGW8uUGBvyaw0NsPiQg7hISeRcwVTgICT8h7roIMIuksOHVx04a2GMyPnl3ElKFeXQ062D/11mhkITM7ongXYgR+N8CVi86+Ddep8gQhJYDL7YQhOO2XUro4Z+1EBZc1o/7PXTsKSr8cGSm+ZLUzlDjZ0zS53RWmnvQlXv9YSPxVwHcVqS/5a1KYGpr0eVWUn6Axtv2llBF8vMWw/EPJAbKXFnsqWm6O86h6GARugHfvIvCG8rH8HBoktjRbZaK4N8/xoztLzEAN4S/H7I3wIZwkVMF07WrZ2YFOw4BcirMfNue5UOfSZ96pK+NQGoYEXf5g8oZwDnzPnTVPOW5Ttd8qXRrimhl+2owJH4Ps1mAY/GtFo5V8yEW0fmNrx/p0CLE2FA3kHvCOm2h22MLxLETVo7vLtZ7VGvZYv5QG+SINvLm+Sfwgc1tRWj5jTdKlThR3pXGh8PyZkrXRUOHJidCbfSgRH8sYREyEy/S7NpKmtodYmrt7CZHgqFSVRkLpjJjSPRTDvluoQHsfzpjUlert1QJ1VrKy0Yk1Yn10Fdw0/FqJEzUnabAFSanJ2LyhmXz/5LC2gq3fZjSX6hiSoRjTE X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf4a3a99-c2b2-4fe9-1291-08db028de482 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2023 06:47:45.1993 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LnlSaLmZm03qh7RcANJEjUXYj88iYbHn/J/VkwOFXvM1XfhVTSysxSl8B6YWa977qdBergBG/nyPyTn9B5EyCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7228 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org With the growth of rx watermark, it's useful to enable the Receiver Idle Empty function, it can assert the RDRF(Receive Data Register Full Flag) when the receiver is idle for a number of idle characters and the FIFO is not empty. It will generate a DMA request or interrupt, which can avoid receive data being trapped in the RX FIFO since the number of words received is less than the watermark. Here set the RXIDEN as 0x3 which enable the RDRF assertion due to partially filled FIFO when receiver is idle for 4 characters. Signed-off-by: Sherry Sun --- drivers/tty/serial/fsl_lpuart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index ba6ade784ac5..2789749d3d0d 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -214,6 +214,7 @@ #define UARTFIFO_RXUF 0x00010000 #define UARTFIFO_TXFLUSH 0x00008000 #define UARTFIFO_RXFLUSH 0x00004000 +#define UARTFIFO_RXIDEN GENMASK(12, 10) #define UARTFIFO_TXOFE 0x00000200 #define UARTFIFO_RXUFE 0x00000100 #define UARTFIFO_TXFE 0x00000080 @@ -1562,6 +1563,7 @@ static void lpuart32_setup_watermark(struct lpuart_port *sport) val = lpuart32_read(&sport->port, UARTFIFO); val |= UARTFIFO_TXFE | UARTFIFO_RXFE; val |= UARTFIFO_TXFLUSH | UARTFIFO_RXFLUSH; + val |= FIELD_PREP(UARTFIFO_RXIDEN, 0x3); lpuart32_write(&sport->port, val, UARTFIFO); /* set the watermark */ From patchwork Mon Jan 30 06:44:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sherry Sun X-Patchwork-Id: 648885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 079F0C54EED for ; Mon, 30 Jan 2023 06:48:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235886AbjA3Gsx (ORCPT ); Mon, 30 Jan 2023 01:48:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235915AbjA3GsX (ORCPT ); Mon, 30 Jan 2023 01:48:23 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2044.outbound.protection.outlook.com [40.107.21.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E04261B1; Sun, 29 Jan 2023 22:47:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BvwGkng5psnCkUJrKmJcgVz9SUcChXWxWPEcYuVWZUW/tEvuZ/zKD0RoxvEdZ0cdbBWMeUHLtpEoEUd9CUhZdTi4nW3tn5QEP0y+R2PsRNX/d3+p9a6hn3Y/+poMXHivya14Ft9xi/fZREd2xny79XDSs9Z1WkSHmt/pgrwC3xDAu2/6s3YHiRLcTYNfNRAzFkwA4WfEfH6Us3QubxLckiFXylX191b5er6+njcrYDcY96fHnQdgNH20iWYGSsmZQIVcEyOBEVtfvlzH2EAAIW4A9XnFqUbVHjh4NTxXuWPx9z0jRURySJgCanSqwzKMAh6YCHl7p5nk5h+KUEptHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GiB68H1+pC6UW6RkLbd7eF0FPUBuix5mh4y8ZG6/OK4=; b=XW8XmmDq0OBRqmvyv5S69wK3Bw29pMZaoMjCh+6m8bSocaYiFJewhleNBLP6glczAYKH/8AJYC5STzU4FKUSMxFir29XpbLEJs/u631Ww1+4NCpmPcACaXkze7cIbntmedfc+8y8Sxu5Ym45b+SCaa3AvRliU+KkI83o2bKnozBxjM1ofxZjOjmtsZj6Exfc0a9w2oaJXcxEH26tgBxVT9th40uK0G7eZXoYueJ8lGa5qrKdeWkrgJpG84I6f2zUrZcOPDv97DS+I35o7ngpQ41Ez3WiBcNUwRmRhzfAaE0IfTfhHrKWMimvc9wDStmBtH5fBn/zADXiUyMtHV31gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GiB68H1+pC6UW6RkLbd7eF0FPUBuix5mh4y8ZG6/OK4=; b=I2glzUmrMB3WVITB0mKNqgCueHcbm4F6Zp+QpVjWqm6WCovLROAJBnTZtfY4SfdHcPqA/FFdBkdGOtx74P9hyy3oPv6HkZb8Bs/tcy+Do1qzqvo2iR6SvcHkwN1AAIhJ3YmB0FuEEz+InqBboiuq5za7d3o/kMWPnwYrHVvriXw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) by PR3PR04MB7228.eurprd04.prod.outlook.com (2603:10a6:102:8c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.36; Mon, 30 Jan 2023 06:47:54 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::7f24:bc0a:acd4:b13f]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::7f24:bc0a:acd4:b13f%9]) with mapi id 15.20.6043.036; Mon, 30 Jan 2023 06:47:54 +0000 From: Sherry Sun To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH 6/6] tty: serial: fsl_lpuart: add imx8ulp support Date: Mon, 30 Jan 2023 14:44:49 +0800 Message-Id: <20230130064449.9564-7-sherry.sun@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230130064449.9564-1-sherry.sun@nxp.com> References: <20230130064449.9564-1-sherry.sun@nxp.com> X-ClientProxiedBy: SI2PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:194::22) To AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8404:EE_|PR3PR04MB7228:EE_ X-MS-Office365-Filtering-Correlation-Id: 4be3f948-2745-462d-35ca-08db028de9df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PSP+OQy6l/eFDcy64BmouMNM6oolJQCH88QVyfGSSYT+cqLDVQ7XfKx6DbyDWxuqMMeeA7imSst5Z76DZLmERIOMe3KyA8yQMmHSM2BoAZuz6JxMXe4qceijiGvKBwwM3WdYbVqnD/bPSCnoZVmd2MVZuEAf8dmQutK+tW9E3Eq3F3eM3j7JJtEQZ4fkDqbL7+OhA4ewOD/CQFSg5J8oT4Xfhg6yAy9ztDL7EYCeRxs7YmRfXdK/D3GeqR6bf/DoOnnFOTcY2q5NxqEfpWvCtCpWBtx/0JUAL7tnPIrWjBzDCk5AYGEIMfoOznYXgp/ELEn7nUf8hAlc9QY1hsX6CvD2LQqghuqxwvhcizLsNceTAzCBLOkHPCNnmp/p6hyf7TdwL3+eMZAQi2FlTowQEAm1ZCDKmmW/EEaFo2+4YI/FAg9MkDjLHe/q4eHjMfV3xlQayb2rn/HBomPClA9pfgYaTMPHR+ulax/DSkQyVhC2mvfCOOsj4X/tZtmSJ2ebHVC/2Dfw99rqLXyC8xAkg5YFgij7va0dSrMtJaXFo+Qr/FLjgqbnMdz85WJYbrfIph4n1uYlD6KZ6nrwk1nObO7+33J5Mu/i1pTPJXICGGLPbuRZXW1H7ZvsSeZ529m4Ploh0Dw7B1s2QYT46olktLnK5pg92/P+cg3fVs8WSW8LBce7G7wiU0Tz96cnGpaf602/plqkbXsW+PGxYvI/i6fiqahD6JZkZs/c3cUqO8I= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8404.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(346002)(376002)(39860400002)(396003)(136003)(366004)(451199018)(8936002)(41300700001)(44832011)(5660300002)(66556008)(83380400001)(38350700002)(38100700002)(86362001)(6486002)(36756003)(52116002)(316002)(4326008)(66946007)(66476007)(8676002)(478600001)(2616005)(186003)(6512007)(26005)(6506007)(1076003)(6666004)(2906002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nwJQKwvZZwGvTARNRSriNhQgDNqHBh9PD808/HBD9o/ohrAZjN3HeHXWDoWzb5tLC+PwgSdJ1d7VdyO9AqeBO9GsKMULEAHRmRvhituiotjopU/cMEMIwcPrekfYIT/gP66XDAAwr+q7HpCvtjvTChNyybaOW0o2vaugW2H4gddgwLtHibbRWrPa0wfufFMBn6mCOWmuuc8rULOVe3DaRzstdtYTcb8hHmgJWpTGfiox0Q3vnKC/ehT5b/oyujxhB4JDvljwMhjDRwHQuIlpSs1ZA9azhZjarDInntzoOQjatmmLFAtmRX3pY7VscE01IFBkEEYTUTDhCtmzv845K+juyx7qO22Imypg8jlvY78DkP2UuqjQnzkpdVeYM1E9lLaMcK2I7pFHg9SfKIZ1W6EwF1L18azRTUJh8CjqbMNbqPDIvmezhUe1b2JtgWmp6vcBTnamqHL2F9u0yE4reYaNFYoBgJBQmExNc9vOqK6KxS1S8KKIsnvNnJGr9n67rY4V2hRufCDPyInsNWAB83PjyPUJgJSVk2tfrThJp/hszrG+LZRBtbtUpa0wDwqtzayQvAMSxmbs3HGq6qa/BXUfm0AQ0/0Wly58eD4IT0fYKOiypxPqGcK38DLfro/dLCrIOAd/CimK3+lr29U3twnlhAha8YHyyE2oL0BGD1EX9j7d4yjwpW0xCFVlfJxo2q4o18hP2Z2COUkVWXL5uUXLyJOlu703wOHek90Ws38hwpr09czgv8t0nSSdA/Eea3tvwzpxyh1H+o0dqEh1YBShKmcMNrx88bcSnwIidRtt8xb32FLw2s5JANTz/w9fYbYFM2cSUQnav1rlSjy8GMVgbPwP6sYbwAFLUNmyYM/TSOaTL/pg/fhCcPsrgyZocp1/ro/RVIgKs89poHqU9U2AND287fwf3IH211A9upp1H8nLMnZh2C7EN6pG4Lk1dYQDvuD0Rstm3LmMmqfW8aXa+GOKyAg4GHZ8RGNPnr7fe74erZx5QJEGq8yOXVawuXlXTpkHi3XR0xcVNtir/TIQeUBv727GJKp0HWcwpPhUd/QfEL6eaBt4zVad426yl42mlZfMeEFB9GlcFvWa1svCgiaWsS9VJw7/uWX9Dv/KjxJdKHsn5ugoYcfVNKo2zoV62P+jJESY9gYxs3/5wRtbK8B7qQ4DQ6S2C1Vbz98WBJJRNBZgjjKLxFGQOCaXVGEAHfdLD1W+sUms2V30bqKB485FjOfBVfomjhPzJq2Gy8o92EJnqcTZOBd7ia8GUmUDokaOJUllwbrhQybw0wUimxgsaHKfCxB0yU2EWDkVvO6iAgjRfMSj2DQIKybSHV5YtwRknE7i7+PzomqOL4uYhfjI7hhhkVKzY0690CcVqjdab2tfQyQkxoTXOYNOyTBp7Cz9xtSMtouXfEy6ENG9b0uLSL+r3Rs0kmp69yScazwPQsQK1E4rt81vOOgezV7y7XLEIbVgPyYY2QLLiL61yDP2QPxpqr1tzKl2eMkvTA5QDYsPRN8sVliVbatsKzu+2rAIE3N0tYawpXhJr+2ZgCyRaf5V/6wGIqt60UjF6yj7wYQq+ATcs2WHAb7U X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4be3f948-2745-462d-35ca-08db028de9df X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2023 06:47:54.1983 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aX89Gg/VHMhn08KHnJTXHQdtS0aA6Kb/7hL1faPAXp7r5H7jvEE9QU/jL0LiAtR43/skt0CJHMnEsgl8Ee8Ykw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7228 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org The lpuart of imx8ulp is basically the same as imx7ulp, but it supports some new features based on imx7ulp, such as it can assert the DMA request on EOP(end-of-packet). Here add lpuart support for imx8ulp, and rx_watermark is set to 3 as imx8ulp RX FIFO depth is 8. Signed-off-by: Sherry Sun --- drivers/tty/serial/fsl_lpuart.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index c35e49a09bcc..644827e97cb0 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -252,6 +252,7 @@ enum lpuart_type { LS1021A_LPUART, LS1028A_LPUART, IMX7ULP_LPUART, + IMX8ULP_LPUART, IMX8QXP_LPUART, IMXRT1050_LPUART, }; @@ -319,6 +320,13 @@ static struct lpuart_soc_data imx7ulp_data = { .rx_watermark = 1, }; +static struct lpuart_soc_data imx8ulp_data = { + .devtype = IMX8ULP_LPUART, + .iotype = UPIO_MEM32, + .reg_off = IMX_REG_OFF, + .rx_watermark = 3, +}; + static struct lpuart_soc_data imx8qxp_data = { .devtype = IMX8QXP_LPUART, .iotype = UPIO_MEM32, @@ -337,6 +345,7 @@ static const struct of_device_id lpuart_dt_ids[] = { { .compatible = "fsl,ls1021a-lpuart", .data = &ls1021a_data, }, { .compatible = "fsl,ls1028a-lpuart", .data = &ls1028a_data, }, { .compatible = "fsl,imx7ulp-lpuart", .data = &imx7ulp_data, }, + { .compatible = "fsl,imx8ulp-lpuart", .data = &imx8ulp_data, }, { .compatible = "fsl,imx8qxp-lpuart", .data = &imx8qxp_data, }, { .compatible = "fsl,imxrt1050-lpuart", .data = &imxrt1050_data}, { /* sentinel */ } @@ -357,6 +366,11 @@ static inline bool is_imx7ulp_lpuart(struct lpuart_port *sport) return sport->devtype == IMX7ULP_LPUART; } +static inline bool is_imx8ulp_lpuart(struct lpuart_port *sport) +{ + return sport->devtype == IMX8ULP_LPUART; +} + static inline bool is_imx8qxp_lpuart(struct lpuart_port *sport) { return sport->devtype == IMX8QXP_LPUART; @@ -2691,7 +2705,7 @@ static int lpuart_global_reset(struct lpuart_port *sport) return ret; } - if (is_imx7ulp_lpuart(sport) || is_imx8qxp_lpuart(sport)) { + if (is_imx7ulp_lpuart(sport) || is_imx8ulp_lpuart(sport) || is_imx8qxp_lpuart(sport)) { /* * If the transmitter is used by earlycon, wait for transmit engine to * complete and then reset.