From patchwork Thu Aug 3 13:01:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Caron X-Patchwork-Id: 13339963 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1C27C04E69 for ; Thu, 3 Aug 2023 13:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yXVsy/n9XDJ9T9yMiZToiLaanhQ6+8+cYl5kL+pi1wQ=; b=ndb3OGCiIdruvz H9SZrlFiRApH7rCuSWN6NO0LTweVMV5hBEG0+ZJr415ApSqdL5Ai7gAc11M8BuTHTN93YL7Qf70uf l3lB79c43nPk2Kpdwz1SMg7IoNHecGU7K0LJxKDXis/eKgfttblHq+/iiK5t4X4juSf+7YOPMACsR xpsYMJYCf9rCGigUSMrZFRgGIHvI61Aw0KziFgq+KOmSr8SWAjz3Uk13yx8uoLG2/ftcB48Ru42WK r6lvrioXssAL0W0t/09rx5iehdBBcHXluVUY9KsgrA1VF1YnVmz/+B8CeDuFEqMeKZTdq6Y/d2PbH DYwGFKfKEe6NSuGUvS5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRXyE-008jaA-2j; Thu, 03 Aug 2023 13:02:26 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRXy8-008jPB-1p for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2023 13:02:22 +0000 Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 373CMHMg031514; Thu, 3 Aug 2023 15:02:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=selector1; bh=NC/gO8r cXxgF7iDZLm/BwKaekNu7y4HW12TwJd7n5aY=; b=k0oA0R6c9TplsKdrZEHP2Rg eRFd3Rr3eik+BOoAzo8MwNwE7DrKXiZba4iuQ+WmVnJ7mq1Icr5lvnvw0iOhrE2N G7zsHc5/eSQ6pPI7IDDZIUeerdmM9mt2nDjhUMPQTjCJcV4jkV2i+jfGHYzw6N2q oUmNjbL0A/ygyYoZ8zzInx4IHZ/0K8pLicycmuq2f61no0z9O5xrj0P9U31qiZhv hD4Kisk0L1zyfZ62rCemZ4trG8R5EZJeFdSsXt57MppKBTdgJDwHfvGq94EGETrk VoAU57z5eUHY2SrpGetjRfresA1o6UV3YZgF2EznNOU2YxSRm6IgDLwSIBKSZcQ= = Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3s893bhkfu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Aug 2023 15:02:00 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5934D10008B; Thu, 3 Aug 2023 15:01:57 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 36C472171E2; Thu, 3 Aug 2023 15:01:57 +0200 (CEST) Received: from localhost (10.201.20.168) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 3 Aug 2023 15:01:56 +0200 From: Valentin Caron To: Greg Kroah-Hartman CC: Jiri Slaby , Alexandre Torgue , Amelie Delaunay , , , , , Valentin Caron Subject: [PATCH 0/6] serial: stm32: improve DMA pause and resume Date: Thu, 3 Aug 2023 15:01:28 +0200 Message-ID: <20230803130134.155355-1-valentin.caron@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.201.20.168] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-03_12,2023-08-03_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230803_060220_951207_726814C8 X-CRM114-Status: GOOD ( 10.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series improves DMA management in stm32-usart driver. It is not recommended to switch DMAT and DMAR bits when a DMA transfer is in progress. This is going to be replaced by dmaengine_pause or dmaengine_resume. stm32_usart_rx_dma_pause, stm32_usart_rx_dma_resume, stm32_usart_tx_dma_pause and stm32_usart_tx_dma_resume functions, are all redirected to a single function, called "stm32_usart_dma_pause_resume", that has been created to simplify dma pause/resume. Amelie Delaunay (1): serial: stm32: synchronize RX DMA channel in shutdown Valentin Caron (5): serial: stm32: avoid clearing DMAT bit during transfer serial: stm32: use DMAT as a configuration bit serial: stm32: modify parameter and rename stm32_usart_rx_dma_enabled serial: stm32: group dma pause/resume error handling into single function serial: stm32: replace access to DMAR bit by dmaengine_pause/resume drivers/tty/serial/stm32-usart.c | 307 ++++++++++++++++++------------- drivers/tty/serial/stm32-usart.h | 1 + 2 files changed, 185 insertions(+), 123 deletions(-)