From patchwork Wed Aug 5 05:23:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 6946211 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EE0EEC05AC for ; Wed, 5 Aug 2015 05:23:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1CF9204D5 for ; Wed, 5 Aug 2015 05:23:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E171420426 for ; Wed, 5 Aug 2015 05:23:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751108AbbHEFXo (ORCPT ); Wed, 5 Aug 2015 01:23:44 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:35723 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751033AbbHEFXo (ORCPT ); Wed, 5 Aug 2015 01:23:44 -0400 Received: by pdrg1 with SMTP id g1so13832325pdr.2 for ; Tue, 04 Aug 2015 22:23:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pcnxIp/6haFQuQGqUlbqQ3o+yPWH+m2TCC4i4xAmTUQ=; b=PGrGY49xyxonrhVThxwCOZrmLEh1ILDloZAV/LQCLdHhJqLnRoPHw6HNKkEaiAD2Qc uwsL5vO6/vn/gpsi4rN/IWCSjJVYPHsrIYAWI4rcgz2QRw9wNok1eqgQGQFm5rppSoSa c/f6CF0vPoYM9OVrbrcdd2z0JyUHWjQ/fnlw9hdHp//+ezrxvDn0R/glEiOWnbyfQqt8 v25is9h0f5Mnf/Dpdo+Egj9dKvUYfiL40D5PKTGpelNfTNOvnV9CAK2CMR01Q7yjKzIp JBIHmEPLKsMAcA34a35KominU1hWy2K/AViZZF+rfVOwQxZGrTIHs8q+F/IWAbrqGLhP F6SQ== X-Gm-Message-State: ALoCoQlb/6kpxv0tsCIsCCV6CaVuouvGFL7t+E0egTAr90LAq4XzzUYdNVIIkiMrpgG5DoNg7vMX X-Received: by 10.70.103.37 with SMTP id ft5mr15581487pdb.83.1438752223775; Tue, 04 Aug 2015 22:23:43 -0700 (PDT) Received: from localhost.localdomain ([43.252.215.166]) by smtp.gmail.com with ESMTPSA id to5sm1228599pac.33.2015.08.04.22.23.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Aug 2015 22:23:42 -0700 (PDT) From: Jun Nie To: vinod.koul@intel.com, dmaengine@vger.kernel.org Cc: shawn.guo@linaro.org, wan.zhijun@zte.com.cn, jason.liu@linaro.org, Jun Nie Subject: [PATCH v2 2/2] dmaengine: zxdma: Fix force stop bug Date: Wed, 5 Aug 2015 13:23:27 +0800 Message-Id: <1438752207-12244-2-git-send-email-jun.nie@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438752207-12244-1-git-send-email-jun.nie@linaro.org> References: <1438752207-12244-1-git-send-email-jun.nie@linaro.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DMA will not stop when clearing enable bit till all transaction is done. The bug is exposed in audio playback because ring DMA chain never stop. Force hardware to stop with setting FORCE bit. Signed-off-by: Jun Nie --- drivers/dma/zx296702_dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/zx296702_dma.c b/drivers/dma/zx296702_dma.c index 103691c6..39915a6 100644 --- a/drivers/dma/zx296702_dma.c +++ b/drivers/dma/zx296702_dma.c @@ -144,6 +144,7 @@ static void zx_dma_terminate_chan(struct zx_dma_phy *phy, struct zx_dma_dev *d) val = readl_relaxed(phy->base + REG_ZX_CTRL); val &= ~ZX_CH_ENABLE; + val |= ZX_FORCE_CLOSE; writel_relaxed(val, phy->base + REG_ZX_CTRL); val = 0x1 << phy->idx;