Message ID | 20221110081728.10172-5-sherry.sun@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp16070wru; Thu, 10 Nov 2022 00:21:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf5CSv9j0z8tmQotjzAqDtUEvmS4T4Ww8k4R8NRWEiEB96UIp3rrY1YwaBzq08NwjPS/BEUw X-Received: by 2002:a17:906:359a:b0:7ae:9bc0:b94d with SMTP id o26-20020a170906359a00b007ae9bc0b94dmr3434842ejb.447.1668068471372; Thu, 10 Nov 2022 00:21:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668068471; cv=pass; d=google.com; s=arc-20160816; b=sBFuDBuClb1KPoaW9PtQgnr5iNTs1tdyLYrQN5Vl0FmyDlWsWoACOTa0vk/lfDUgix OAA6ZlLtGnJOICfmktDh2U4e2g0ob9VUbHtxdU8MKX0WBhU5nhwqtohPNHJxoj/D7wqy U2UU03T5UZzxCjPa0PAIidPZUfqY2Gkn/s+ym3Bv7yzaP6ig3k5QQWjA9xkxPvqTxEje zHmkq8e7iy1rU1ULMncLBbS62GSEcK5t35YoIZzdXA5FeYxBX47k4857wlDPH3hwoCT3 9DqeKKlHN2P8SDVXxCAgnpwjSDwvB5TwsUIVzaE3eEYLbzya4Iy79FuJ96vYwn1WtKps k+pQ== 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=4b1Y2EtQ2iAPh+mxExuyLOBHsj0n9gfMEGVN1y2L238=; b=ofMFaC9X6v5kyeJgn4piVbZPfmD6kU9wsfXwZmjon1SW+N4tZvMNPkhnvl9bDGJ00E Z32JPxmzQDV5O63mu4RmGt+bs2OMk90+x+UfFldwsrJ6ZJGRQqp59T3o8DgLFtlcO56N lNkjl/jxgOALrOw36izfA709WE/2Fp4wJDIgvSBsuVEWFFH1xu4reBv/JPnmzH9xh2NB xJAXMGdLmRncO5o66EqLWDL5SO26nkbnR+36afI3uTTmzQMK57UI8Mvm2kPAWJ0MBeS4 YDyRw3Lq+2+2kIym5QTQ72IYouqLv/4CivRRmTjTsbasUAbj0q/58XLu0OahdLU+tC3p ICEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FMfNT7sK; 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 h18-20020aa7c612000000b00458cd6f8506si15483710edq.173.2022.11.10.00.20.47; Thu, 10 Nov 2022 00:21:11 -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=FMfNT7sK; 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 S232762AbiKJIUM (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Thu, 10 Nov 2022 03:20:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232924AbiKJITq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 10 Nov 2022 03:19:46 -0500 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20077.outbound.protection.outlook.com [40.107.2.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADD3B184; Thu, 10 Nov 2022 00:19:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kzGg2HBlficf2FnJvSxnWmjYHY3NxtlBA+ci4xuGNArUi+GiaoBJVqTfzSTOttCf4/tET7SbYPLnxx29Q7Mtt5cfPXWWc9SdmoOEOqM/mQAbwo7Mop7EcRHjBnnbgeNh2vh8+iWfLsYrc5eoEOrrT4dxzFykB9GgyjPlttyjwAvABhGzNdN48vgBva7Seg9vcXV62hanX1GDjj1LxQHH6IfSq95J2qKAW1L4AvnNg0gEzSze2Oyxxgl468i+st9Shms8w/0PIkOyXG8A/G114+n1AZKe83/dt5kIpzU6tEVpSPZcm033RZ2Ou/WUxiCxwR3hlz5pv6PHNxPtgELy8Q== 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=4b1Y2EtQ2iAPh+mxExuyLOBHsj0n9gfMEGVN1y2L238=; b=nCYDMxPqzqGworexcjWEC4pVvYNgG5FRfre8Z0EJR43hpW1gx3k6RprhE60JnHPdMxocFXC3JrWQkH0QiBI+cZAUA4v7V6MQzIxBslsONiuwiISAyxExJOzpLx92/1U90YbDLh+KEeYfpn3JubY/AdwlfLcNzyLDHOvrviocWbLcqISbJZl6grSWkDpMm1Vlqd+SEe93iRfoEzzBoyYhoh904vbP1JFTVXjj9IJuXFul1ALyDNF6SX79QdRLRX4fTxDvfx43RMjOxqbTv/ec4XRkDbWzsCFgnoU2JaygR2jjgKtTmlAKKom9r7l0am82J6fc7Hpj7ITqP9EBgaSRjg== 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=4b1Y2EtQ2iAPh+mxExuyLOBHsj0n9gfMEGVN1y2L238=; b=FMfNT7sKpheeU+2wJO4y2PHRSQKI5C2hYItg4bwQUjCXsJGVvvgzdgcZ0nlBuGALH5a/9lHGntSb5EoN0eTLiIFclkM1aUDQh8qYHy+WKyaA+N6CSuj91e4fEogYHAhddmD/xXyib1yttRSmRRYrhDj+du8qmW+kAV5gV/c7he0= 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 AS8PR04MB8916.eurprd04.prod.outlook.com (2603:10a6:20b:42f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.24; Thu, 10 Nov 2022 08:19:39 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::71f1:f7bb:5039:e55d]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::71f1:f7bb:5039:e55d%3]) with mapi id 15.20.5791.027; Thu, 10 Nov 2022 08:19:39 +0000 From: Sherry Sun <sherry.sun@nxp.com> To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: michael@walle.cc, jingchang.lu@freescale.com, tomonori.sakita@sord.co.jp, atsushi.nemoto@sord.co.jp, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH V2 4/5] tty: serial: fsl_lpuart: disable Rx/Tx DMA in lpuart32_shutdown() Date: Thu, 10 Nov 2022 16:17:27 +0800 Message-Id: <20221110081728.10172-5-sherry.sun@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221110081728.10172-1-sherry.sun@nxp.com> References: <20221110081728.10172-1-sherry.sun@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0022.apcprd02.prod.outlook.com (2603:1096:4:195::23) To AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8404:EE_|AS8PR04MB8916:EE_ X-MS-Office365-Filtering-Correlation-Id: cf058292-f10e-47bf-c8e8-08dac2f44f67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jXtlI2wg/0XOeBWBKlfxDeOSnM2q+nQo5GObqF+tG5IlXUkRXXEUVYZRXnhnmb87XxWSnY+ISYHMkAQMxd9b3j9ljcK8FChXc3WxEGykoHCf0SxxKp9SkVKhZU1tdmVZ7b5pi7J73cePcC6Iv5gNlGxMJV01jKI4JKD8zNz5JYIrOVZJ4541xZ2lVzy8n6Lrnp5XCh8k1hfLqYaRHuy8NtWlwFZDAT7SOVuHsxebXV30iAhJi/64SncBNb9w5ToxcFv8vM891CW3+P+PJ0w+0l9fc4FGDO0Gqx3Wi/Qu2aW72m2536Kwj8Oh/fPz7TnVIzEdUIBG87y9h1PGEqvmOgGlwJYtIHBG6+U0oBWy1CPNtOCkjpgdI2VUFmGrxuXeqTk9IAxRV8yJh3M0DL0hy1d+LOpFJ+fJhhwl9VejPJZh8NLp2VncYskvL45Mrf/pR9yAkI4oe4ikf7oFq6jWiOfy5Cpmz/Hm489wT7RR9HMscy+IzHu1r9AB/9gquTBdKm4RZ/XsDaRfJgZ5mRxYhRO33C3g1nEUJISpEc8zz9SJeHCc854KWssRL++9wwpUEwWj0UsxorSvdCuTLtFv0pRI9kc8SRSx2uLXHfoNUxYIhA6TKX44nRTE5TMHA02CSzDChTsWJgxNIL/Xl34nrYvBQCobxcxfyv4U50SbhDwz2JXbQ3VGdF6Zs+M6/2O5kan6o0ugW0rXRIMwLqPkQ9wkCwbeh1HL8aw7r9bFpakDUt++V0jOe5Q2X8W8hfj2qlj1/K0SmcfxnV8G8lEnLw== 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)(396003)(346002)(366004)(136003)(376002)(39860400002)(451199015)(6506007)(38100700002)(38350700002)(36756003)(86362001)(26005)(2906002)(478600001)(6666004)(186003)(41300700001)(6512007)(316002)(66476007)(6486002)(44832011)(66556008)(83380400001)(66946007)(8936002)(2616005)(1076003)(52116002)(8676002)(5660300002)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hLD4upmXYB3a6iRcnIxQ0O3+Zkb1kgD/37njQosPgJBez7vivlX512kDtER1WPdyruoFiwf99TlNUlMV5LNbR4VxjtoiFjxaJGyV2ra7UJmFs1CU6sbGO8i6ikXI1smjuSWeLzZa8xBTUNPu1Oi6qDi5KkVWwrWXUtEroGq2PQYdiSspXA0fsi7d7DiyfvrBU+KPWwvfaLObJEPv05L1VrtgaT78HV8edX0aPg3CAWyO8rlWl0WjIP9CufVPa1Op1ci26m5Q0+NkHe9XdmOwitD5d/9uE4rEcr/JT/jGnAlqDdV4KQ23KCqXIQGxe98cw/hr1+CId8jqlCBSfxnxkafiFPonAGZVSiMGrrF9GUzVJTHI0Iw0TMPK6DYOCPJ0S2qvbY2N+RArCcSO4iSjkQ+4hH8jVyZqVoqARKhjU9nCbT1sNY2wMbQK62NMf5TkOuGGSIvfQiTfutxAyK4F2dR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/uLWoQHXoqR0O83diLGhCvNYKJwLG7IaNAxfk7ou8XP578nVaJr7m X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf058292-f10e-47bf-c8e8-08dac2f44f67 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2022 08:19:38.9950 (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: w8otUT0GgzDNZQdYGJyYu7/fHYsbDDEcphAlMx6geJ3CrULfSE/d/R8d5QZrBrTosu8w5EC/kzPmKvN/cjZyVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8916 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?1749096565828510673?= X-GMAIL-MSGID: =?utf-8?q?1749096565828510673?= |
Series |
fsl_lpuart: improve Idle Line Interrupt and registers handle in .shutdown()
|
|
Commit Message
Sherry Sun
Nov. 10, 2022, 8:17 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>
---
Changes in V2:
1. Split one patch into four smaller patches to improve the commit
messages and add Fixes tag as suggested by Ilpo.
---
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 a6f7b056d57b..c297be11422a 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1769,6 +1769,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 |