From patchwork Mon Apr 11 08:38:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 8798721 Return-Path: X-Original-To: patchwork-linux-arm@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 A8A81C0553 for ; Mon, 11 Apr 2016 08:50:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D218B20220 for ; Mon, 11 Apr 2016 08:50:22 +0000 (UTC) Received: from bombadil.infradead.org (unknown [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 095D4201CD for ; Mon, 11 Apr 2016 08:50:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1apXPQ-0008UO-AH; Mon, 11 Apr 2016 08:41:24 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1apXNw-00060V-Pe for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2016 08:39:57 +0000 Received: by mail-wm0-x22d.google.com with SMTP id a140so2939384wma.0 for ; Mon, 11 Apr 2016 01:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TIblPeNxgSRaD7ArU7HFrnaVaI9QvFYmOTEo6KLsdh8=; b=bJgNB2rR1D0g5y//BlsQx533RGSFySeyuwFXyLaAOVSJPlgANGgB3OR/KP0D1VH5kr 1BHCvpVaMqobNQlGguNSb9nfmqrlvR/4jgcqvtxjheEAec48j/CxM9OJVWOqg3QLDL5M n9ksGsARin/5NC2WmaFUacVvHoqtrdY4rXbUc= 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=TIblPeNxgSRaD7ArU7HFrnaVaI9QvFYmOTEo6KLsdh8=; b=O6HaJGIUPGvoGYh1rYqEwprKtL5nanDOeNA+pCQISXKWmMUbdHsBIyrwtDldB2juZW dwzPnZxuOJ1QSiUSxtI0F9zjtSCKoJ2tEUosuXROlr3G5mdS9fGvGi5cl3AbA5Yhdfj/ ehSbqCf+07ob+MIsUA1y1PUCyylRu0eif8SBxZRD2+jDuX/dvnGjSMkZXUCdHHaFz356 2VBOD2H5OniLDVJQovCoRaxkl7U81E047cfSPZfVJqQTPSbb7DBeYrr/EOz/sRv+bmAX CMxY19HGFseXZho4Cc6lgwOR/xAase7zp+hZpqWYGcuLuqReQ8WPihymCJklLXZifN93 K2pg== X-Gm-Message-State: AD7BkJKjRcOu/sa1ylUeK/ln6Bb3wuXt7dbuZuROaba/GYzZukIkzk5gFRhgHc932gPGF5dy X-Received: by 10.194.243.226 with SMTP id xb2mr22216866wjc.35.1460363971454; Mon, 11 Apr 2016 01:39:31 -0700 (PDT) Received: from mms734.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id d1sm16078604wmh.18.2016.04.11.01.39.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Apr 2016 01:39:31 -0700 (PDT) From: Stanimir Varbanov To: Rob Herring , Mark Rutland , Vinod Koul , Andy Gross Subject: [PATCH v3 5/6] dmaengine: qcom: bam_dma: use correct pipe FIFO size Date: Mon, 11 Apr 2016 11:38:42 +0300 Message-Id: <1460363923-16296-6-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1460363923-16296-1-git-send-email-stanimir.varbanov@linaro.org> References: <1460363923-16296-1-git-send-email-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160411_013953_324876_72B3C41E X-CRM114-Status: GOOD ( 10.51 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Archit Taneja , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Stanimir Varbanov , Sinan Kaya , dmaengine@vger.kernel.org, Pramod Gurav , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RDNS_NONE,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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 The pipe fifo size register must instruct the bam hw how many hw descriptors can be pushed to fifo. Currently we instruct the hw with 32KBytes but wrap the tail in bam_start_dma in BAM_P_EVNT_REG on 4095 i.e. 32760. This leads to stalled transactions when the tail wraps. Fix this by use the correct fifo size in BAM_P_FIFO_SIZES register i.e. 32K - 8. Signed-off-by: Stanimir Varbanov --- drivers/dma/qcom/bam_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index d0f878a78fae..7e5ad1c25e21 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -459,7 +459,7 @@ static void bam_chan_init_hw(struct bam_chan *bchan, */ writel_relaxed(ALIGN(bchan->fifo_phys, sizeof(struct bam_desc_hw)), bam_addr(bdev, bchan->id, BAM_P_DESC_FIFO_ADDR)); - writel_relaxed(BAM_DESC_FIFO_SIZE, + writel_relaxed(BAM_MAX_DATA_SIZE, bam_addr(bdev, bchan->id, BAM_P_FIFO_SIZES)); /* enable the per pipe interrupts, enable EOT, ERR, and INT irqs */