From patchwork Sat Apr 27 03:36:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Cheng X-Patchwork-Id: 10919883 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5EB5D1398 for ; Sat, 27 Apr 2019 03:37:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B75028E77 for ; Sat, 27 Apr 2019 03:37:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DC9228EA1; Sat, 27 Apr 2019 03:37:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DC01228E77 for ; Sat, 27 Apr 2019 03:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject: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=21zZPyprDASRg5pAGPKrxkKdx51UahoVUUnM54Or2C0=; b=F0TbfJeBYVPXat Jdur6Dx5ySAYWS8Cjp5ewE2zBZKyDLTf0Q2aLewBjXDH1uwI6yPv/theBPc1LHYYcDQBYOSQqy4bo TWP9aGtIUZX2BB6lJeQGaaxhsv0KJgsSpWDqfAMji6V0O4soxKpnamKeVUGASXOaVN24CWKqjadGP GgQNzNfwODKyBWHAeRYes1rQiUl5hWSYPu3CL+/c/XaB6Q6n8p0Kdv0sSKAiplruMHW2h0M+Gq1j8 y5PTGTG1GFccfNzgnKBkD4HGCWLBgEYOMg11N2zym4gwuzdbtYEWCoop/TwiyGcj882XvOVVeoz1q 74mYJTyPLbTYYQnSN4GA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hKE98-0000gq-MZ; Sat, 27 Apr 2019 03:37:02 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hKE90-0000Wi-IS; Sat, 27 Apr 2019 03:36:56 +0000 X-UUID: 64d828ec609146588ec52bcda4c62c08-20190426 X-UUID: 64d828ec609146588ec52bcda4c62c08-20190426 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 161172198; Fri, 26 Apr 2019 19:36:50 -0800 Received: from MTKMBS01N2.mediatek.inc (172.21.101.79) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 26 Apr 2019 20:36:49 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 27 Apr 2019 11:36:40 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 27 Apr 2019 11:36:40 +0800 From: Long Cheng To: Vinod Koul , Randy Dunlap , "Rob Herring" , Mark Rutland , Ryder Lee , Sean Wang , Nicolas Boichat , Matthias Brugger Subject: [PATCH v12 0/4] add uart DMA function Date: Sat, 27 Apr 2019 11:36:29 +0800 Message-ID: <1556336193-15198-1-git-send-email-long.cheng@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-TM-SNTS-SMTP: 380E7148DB3C720F74ADAE99429A073B5931D5CE5B02F9DD34F8311691EB87102000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_203654_612371_3321B97F X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhenbao Liu , devicetree@vger.kernel.org, srv_heupstream@mediatek.com, Greg Kroah-Hartman , Sean Wang , linux-kernel@vger.kernel.org, Long Cheng , linux-mediatek@lists.infradead.org, linux-serial@vger.kernel.org, Jiri Slaby , dmaengine@vger.kernel.org, Yingjoe Chen , Dan Williams , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In Mediatek SOCs, the uart can support DMA function. Base on DMA engine formwork, we add the DMA code to support uart. And put the code under drivers/dma/mediatek. This series contains document bindings, Kconfig to control the function enable or not, device tree including interrupt and dma device node, the code of UART DMA Changes compared to v11 -modify TX/RX -pause function by software Changes compared to v10 -modify DMA tx status function -modify 8250_mtk for DMA rx -add notes to binding Document. Changes compared to v9 -rename dt-bindings file -remove direction from device_config -simplified code Changes compared to v8 -revise missing items Changes compared to v7: -modify apdma uart tx Changes compared to v6: -Correct spelling Changes compared to v5: -move 'requst irqs' to alloc channel -remove tasklet. Changes compared to v4: -modify Kconfig depends on. Changes compared to v3: -fix CONFIG_PM, will cause build fail Changes compared to v2: -remove unimportant parameters -instead of cookie, use APIs of virtual channel. -use of_dma_xlate_by_chan_id. Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (4): dmaengine: mediatek: Add MediaTek UART APDMA support arm: dts: mt2712: add uart APDMA to device tree dt-bindings: dma: uart: rename binding serial: 8250-mtk: modify uart DMA rx .../devicetree/bindings/dma/8250_mtk_dma.txt | 33 - .../devicetree/bindings/dma/mtk-uart-apdma.txt | 55 ++ arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 51 ++ drivers/dma/mediatek/Kconfig | 11 + drivers/dma/mediatek/Makefile | 1 + drivers/dma/mediatek/mtk-uart-apdma.c | 666 ++++++++++++++++++++ drivers/tty/serial/8250/8250_mtk.c | 53 +- 7 files changed, 807 insertions(+), 63 deletions(-) delete mode 100644 Documentation/devicetree/bindings/dma/8250_mtk_dma.txt create mode 100644 Documentation/devicetree/bindings/dma/mtk-uart-apdma.txt create mode 100644 drivers/dma/mediatek/mtk-uart-apdma.c