From patchwork Tue May 21 07:59:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 10953099 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 BD10E13AD for ; Tue, 21 May 2019 07:59:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFD4328758 for ; Tue, 21 May 2019 07:59:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A18E92899F; Tue, 21 May 2019 07:59:40 +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 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 3DFE328758 for ; Tue, 21 May 2019 07:59:40 +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=xz4iR4P4HlYiz/dZrEK0gCsyUw8Nnr1m1fT8TIogsLA=; b=oyvBMCI1zP3R4L GPfgxSczVTJFb80fJQ7gQGRSXGsN8TNR9GnBhnrCH+yd4rSMuRMCjDsCUOYmIuwhNtjvxDQp8sCIS 1Zr+T9p2AFkYZZhGKAMf2ynLNwoEN19Vv8RTT9khgXv3ZIH2ADbyByD3Ipj72PZkmgCwNZZBhsnIj JrkiTUCVG29FCrJGCE5Qe6EIgRmg4adw56pKURPGbLHI3lmFSGau9KxOEhqvFwqrgsiTaBvENnuFF qfmycCZ5ULrAW3uAD9Ss5vLiX2+YVYjQbQGHD3GsnEQKR7K69/ubSi9K2+s06mts9WT5Blpaz2VYN uM44NvFBWJuLg2I8o2Ng==; 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 1hSzgR-0003zD-3P; Tue, 21 May 2019 07:59:39 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSzgO-0003yZ-3r for linux-arm-kernel@lists.infradead.org; Tue, 21 May 2019 07:59:37 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4L7xXqj072922; Tue, 21 May 2019 02:59:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1558425573; bh=IzWT3e6xVFbiZmSHFjmPBCCwZEObs0gFBMkK0Qxp8bg=; h=From:To:CC:Subject:Date; b=onyOFoYd6iT3zbfUFrP1jChuvkmOzb97Db8+o2dfG3+pdNkb8jHonbpEOYD/98gld ivbuzODleKw4Yhuj+epqWIS3u2uD5zqVAw8bdZ67wshrYaLduB02Hr20a/+5nAneUS AwGMIZAwmsAK1329HQVpIOXBSCS5lhVfi8YL7rBs= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4L7xWYj051369 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 21 May 2019 02:59:33 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 21 May 2019 02:59:32 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 21 May 2019 02:59:32 -0500 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x4L7xUjx078442; Tue, 21 May 2019 02:59:30 -0500 From: Peter Ujfalusi To: Subject: [PATCH v2 0/2] dmaengine: ti: edma: Polled completion support Date: Tue, 21 May 2019 10:59:43 +0300 Message-ID: <20190521075945.14085-1-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190521_005936_239908_DA39DBED X-CRM114-Status: GOOD ( 10.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, dan.j.williams@intel.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, Changes since v1: - Cleanup patch for the array register handling - typo fixed in patch2 commit message The code around the array register access was pretty confusing for the first look, so clean them up first then use the cleaner way in the polled handling. When a DMA client driver decides that it is not providing callback for completion of a transfer (and/or does not set the DMA_PREP_INTERRUPT) but it will poll the status of the transfer (in case of short memcpy for example) we will not get interrupt for the completion of the transfer and will not mark the transaction as done. Check the event registers (ER and EER) and if the channel is inactive then return wioth DMA_COMPLETE to let the client know that the transfer is completed. Regards, Peter --- Peter Ujfalusi (2): dmaengine: ti: edma: Clean up the 2x32bit array register accesses dmaengine: ti: edma: Enable support for polled (memcpy) completion drivers/dma/ti/edma.c | 129 ++++++++++++++++++++++++++---------------- 1 file changed, 81 insertions(+), 48 deletions(-)