Message ID | 20221125101953.18753-3-sherry.sun@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3917740wrr; Fri, 25 Nov 2022 02:45:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf606o84vOtnzmXPQUG+uNRvT7am5dE3mNyVCcOU8U6j8hz+fUHKbyU+iyV7f9LBSYshG7Rf X-Received: by 2002:a63:5e46:0:b0:477:d01a:ab4f with SMTP id s67-20020a635e46000000b00477d01aab4fmr5852266pgb.378.1669373155863; Fri, 25 Nov 2022 02:45:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669373155; cv=pass; d=google.com; s=arc-20160816; b=JlEehVgfoS09LHDtad5B7i0ceE9CoAglDpo0ve+t5tqYs+QQdqcndEOyDX/gDU+rwm f2FFNd3adhWGOQQcP6FLpGESFgXeYK/C1zZyCESlLCgfhLo5trdAF6wg4Mml/hgLpGn3 VDG0AKLsmvaAAtVxndW8Q6MzJs6rBt6oHI3YduFdC8A9H9bPkNtFW7QzZuKlwGP9lg// h5t52N22mkemUQMmmx6anoEdYQVBN0L1GDvEpPfNbF3wy8Ch8THCS6G/2F5uFWMiTDdR QNtzNuMofIJ1v5m0UXzPKD0MJmr2qz81ahARlXn5KLpUve+RmJXKS/oMkuLfXLWjeo68 E1Sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=pR9XO/rjSdD3h8ydWemhdF1l8LqZeekBPDfF4XzmGOw=; b=E1D0cI6+qyke05uaSl7AYGFi/9uFUA6Cpricrx8zArXinyo8KcPFdNlIcUMEAZfG+I cGOaOzzL36YmmLCN18gPl1LAS0Su6qkqTYnczKJtOzqsfiaoQs3NiPuV59UvDlBiXGCC UlZJcTsOiQYWDvkYlNiwXFeaZw5rnPuFblxFu/lcQgnW++Zj0A3+iIpZKBv7F736H5/M hsUQw/DBnHVo/qSqk6eRbUQLyFLqCtx0yyrcE1g1vnbvAFxlqUecLk+tyOcalJiuF/tz 2D5nynqyM27AygFxSI49fNJzJYaU0OMghrldH5sYxOh+rYW3oIRAjOuTHCjqtIaJs2zK OcDA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=NdgL2cBa; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on16-20020a17090b1d1000b00218de7c19efsi3685223pjb.108.2022.11.25.02.45.43; Fri, 25 Nov 2022 02:45:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=NdgL2cBa; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230204AbiKYKX4 (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Fri, 25 Nov 2022 05:23:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbiKYKXu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 25 Nov 2022 05:23:50 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2058.outbound.protection.outlook.com [40.107.21.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B1E941982; Fri, 25 Nov 2022 02:23:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e+xxXvJyuhy16Y4Awp/och3iJnQpTtARWFPqgmBqK5OVio16pFQ0GtAe3hrw6UOEX1WPJEhDVODtDl7rWU6nRKrbxCAgDca/X4qradk6JmxtNhOM9OW0CHXGlys7it8+HES1a6/V61Vp9Tx5MiDOoYwS6uf5CT0HOtbcyLXP4Zw0mwQgZK2ioD5oBJ4rUfWikL7Vy6ijcKGDkD+d9XuAmyXLLliOFaThDWKixXCA4K/BKBuMGOqTx+0YQQc9oEoDIP0U1k4Dk6o1StuqR4i6qUCdmdisSurLEQBqznkXiXc/zzkZbVoO5HfX3fWMFW+uXdMCMDSe6hW6x08feCoTWg== 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=pR9XO/rjSdD3h8ydWemhdF1l8LqZeekBPDfF4XzmGOw=; b=DZh4erEu5YTVZcWbfgUZ/npjFp5/EXWIasAcsEY3k/Ql0qouuejkmWqGuOZpIx4HJLb6vvU8O4RxHKeVBUrRYxXDSomkyZzyYBDJ5AhbtkA4koM6rzXIRN9sGCCEPnqRi7uHlwPSfGwL8JglXC4V1UkInZrf3+BAHB4WeE9vl0oUtXkdMzPE7nhKkrddZftBerFEteLzi3qLcjp4SEtZ6JITpg1zQ79tPKLe5A3DXHVvCxi+rt/EyfOjZkSeHLLNbWGtQhJbaQlr1+luANLMdgCPluchY4wj3W5BfahNR/mk4DnrfiVF6avO36N2x/JmlSwZFcNOLnFUqg9cYxa9BQ== 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=pR9XO/rjSdD3h8ydWemhdF1l8LqZeekBPDfF4XzmGOw=; b=NdgL2cBa60eGMqRomC6s3cFcrAR4hcmWZ0eLBbvmZpNCVQMSZQH07fVpEVEzzAxU/KGKOyjxNtyNUhBVAkWn8kWMyKLNPC/gpt0Qi90b5BSlitt+JSi+wJGmLUyxhPy5jo9E77Bs+qO/RYfP0JacgCXOzbYJKyn4lw2GSWri9VI= 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 VI1PR04MB6927.eurprd04.prod.outlook.com (2603:10a6:803:139::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19; Fri, 25 Nov 2022 10:23:47 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::aaa8:55c6:bc8b:6bd1]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::aaa8:55c6:bc8b:6bd1%4]) with mapi id 15.20.5834.015; Fri, 25 Nov 2022 10:23:47 +0000 From: Sherry Sun <sherry.sun@nxp.com> To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, atsushi.nemoto@sord.co.jp, tomonori.sakita@sord.co.jp Subject: [PATCH V3 2/3] tty: serial: fsl_lpuart: disable Rx/Tx DMA in lpuart32_shutdown() Date: Fri, 25 Nov 2022 18:19:52 +0800 Message-Id: <20221125101953.18753-3-sherry.sun@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221125101953.18753-1-sherry.sun@nxp.com> References: <20221125101953.18753-1-sherry.sun@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0042.apcprd02.prod.outlook.com (2603:1096:4:196::19) To AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8404:EE_|VI1PR04MB6927:EE_ X-MS-Office365-Filtering-Correlation-Id: 30e48755-a469-4bf9-0ab8-08dacecf2302 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TZd35gmEQyEY7WCSaLh0KfdFaa+Zviv+etDz62faWWBjrjDydJeZKVZCxsacpkEhIWgYyylHWDN17rr0OVaf19bUIlnD8+q2hueYI0Y40V5xl3tpgvaC7hFrNHG7GZL77xs5xQ7CGU3P/rpF8d+g92bAAF9x61kORYbom2h8I9LTUw8ld+oXFhZtdmx6esSFkQ2J+j2SfPTsfq/LJ6575YC5ZH5HNayie00NoLvkwEZFHeXU/B7GKZ0U2S1ASOtXCYYds1kqB6OTRHpbGD7bVqLeK3EE3KEeVESc4MMFKDNtdK6sKq0KsCOD/t0gbIQx9mJdmIt9yeXuMwTvLUOjfgxnJk3s74AQ9lPfVZ7dlq5e3Px4qhcScDRUAcgDDcqGI1EubCp7H7TOMiGkFk9s2ULX35lzxHBxafG3DcWK2Qhy58D7/UJRYDvzuXIOYG5uqtqSwULJxJRhh/0P4FcJdHMOruvY2jeo8fF8LVN9lv4U6JnGRTVrQGdIr7SDD8bofw0jf7OGrNIUms/mOfFkQhB8W+L2An5BR6cRYwYKMowVSloldwKAMPLzNRgk6ffsBTo6Zguu4weZ301HA718BlZYoE6niK86NNsOlZgFPTExGZWMfUghfLW4wVykk5CeOrO0Dz1rSANYCVXF5PpWC2zZ6drEVpSIDLXu6UbO4v3b0MfX2vfwA66/Z7g9XKKTxNYb5P8Nu8N/eSjc04T2MA== 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:(13230022)(4636009)(346002)(366004)(136003)(396003)(39860400002)(376002)(451199015)(6666004)(66556008)(36756003)(6506007)(316002)(52116002)(6512007)(66946007)(66476007)(26005)(83380400001)(2906002)(38100700002)(38350700002)(4326008)(186003)(86362001)(41300700001)(1076003)(8676002)(44832011)(2616005)(8936002)(5660300002)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JTo2DVud1fL1TO2w3owc7WGT60FrOHdqX0plzxC7auOrv2Y4f5LeJf3J0ORF2jLP2JNpukS/+ktXzn8K95Te6xLswAWuy9pBsHPASsUmODvr/7BngKw7DPL9dSDaDFkzk+9AwBlMrtLhofMsR07ItkR4m84nQDHOP25bLKEUyEtADgrdTz4UzoMqHkRPQfoNPdCMUIEplPXuoe1/s1SmixbQb2QS0Xz6kGyFJKPiX8k9CRzblEgXxt7lNC803c2VllYNsza9alsiWQEoGpFPG4xb6sEuQVS5gf6QrCCxl7Gv/etPFmpJMf0dTHiOmYJZs8FiNpy/VkRxrXa6lOnlR23U8kNioxjFvUQ7XJiwg53gpyd/oElQtD9tZdf+N5tAxp4TEoOr+XNSWEJYDWPujTCL2zwLVNg9CWSkQwghaVKsZ8gnyhEWlDplI13CtqkWPMe6EL5toS5lxjSUtT3MIVWyc+WnHtuZCL6Ld9UTBe2zbeA9S+7Zd7F4YpsV6aDcDr8CFPROjtAM1KBzLac8jrdsPqyRyzc0OEEY2GikNjeWxIJGjF3yJ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-a469-4bf9-0ab8-08dacecf2302 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2022 10:23:47.0059 (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: CpjBYtH7ZJ2BxHDTfQjytZQFBvSaL7BUI0faNZZoJsp64Gy4Y49v+GKBAogNM4wfmDNKlk/37bj7tYvnGJV73w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6927 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750464626765643766?= X-GMAIL-MSGID: =?utf-8?q?1750464626765643766?= |
Series |
fsl_lpuart: improve Idle Line Interrupt and registers handle in .shutdown()
|
|
Commit Message
Sherry Sun
Nov. 25, 2022, 10:19 a.m. UTC
UARTBAUD_RDMAE and UARTBAUD_TDMAE are enabled in lpuart32_startup(), but
lpuart32_shutdown() not disable them, only free the dma ring buffer and
release the dma channels, so here disable the Rx/Tx DMA first in
lpuart32_shutdown().
Fixes: 42b68768e51b ("serial: fsl_lpuart: DMA support for 32-bit variant")
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
---
drivers/tty/serial/fsl_lpuart.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 9b8d32262f1e..88697ddcd8c4 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1799,6 +1799,11 @@ static void lpuart32_shutdown(struct uart_port *port) spin_lock_irqsave(&port->lock, flags); + /* disable Rx/Tx DMA */ + temp = lpuart32_read(port, UARTBAUD); + temp &= ~(UARTBAUD_TDMAE | UARTBAUD_RDMAE); + lpuart32_write(port, temp, UARTBAUD); + /* disable Rx/Tx and interrupts */ temp = lpuart32_read(port, UARTCTRL); temp &= ~(UARTCTRL_TE | UARTCTRL_RE | UARTCTRL_ILIE |