From patchwork Tue Apr 5 22:56:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 8756521 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8DADD9F36E for ; Tue, 5 Apr 2016 22:59:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE249201FE for ; Tue, 5 Apr 2016 22:59:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [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 002542011E for ; Tue, 5 Apr 2016 22:59:32 +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 1anZvF-0004WY-1s; Tue, 05 Apr 2016 22:58:09 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1anZus-00047h-BW for linux-arm-kernel@lists.infradead.org; Tue, 05 Apr 2016 22:57:48 +0000 Received: by mail-wm0-x236.google.com with SMTP id n3so40105591wmn.0 for ; Tue, 05 Apr 2016 15:57:29 -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=nrltqaL4Lfccs8XQgWc5v2xW9Tj9ltknjgUfWwbjjEs=; b=EByU60gjECumjOS2K4S/ZdX02eDvlhSzvjUwVYv2Av6BHTNaZ/UpCvk8Vc/K06oFgv tbgzEGE99b1F+f8rdm5Z9XXXY38VJJX3z2l5N9Pnk9XdZZm9FKKckEgft8pfFMF1xiuj 8GicPjFmp6/lnussnxqPym6CP9zUs992q+dh4= 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=nrltqaL4Lfccs8XQgWc5v2xW9Tj9ltknjgUfWwbjjEs=; b=Mcgyp29u0cVlGCjhVHw5/m9HLLlJTZibmE4cpnP2NPILNNm8WC0+9Auj67acA7ZmnE q5HiT69GvbBCd8Fzpb/VNP/4wCcr+LW7kRXyGqblVCWQKQ6XGQ6Ynqnk24K5I88KJgrM r3oWw8JjGSlcL9/etD36OFUEoXolS1V3Pysmamc4AiRHmWRhGWxtvcCEFDnOejA/bMaq KRW6jti8jcMgbzjfFSaLtquORwzm7ui+9GWNXKEBiy0Az5yFEsLaBZYObW1zj5r76tp2 m4td6E/bM4mNNkGY0AEFdyHPcgOxe0N/l/rOdcXZFI32gUqE8v8q5ree0MrajoTWxI2E aLVw== X-Gm-Message-State: AD7BkJJC4xotm24t0IvyFbGoiqDLsxha6Ekq3N9bZX4HWJgOojZe9hvG5ANmorikTruwiSE1 X-Received: by 10.194.86.202 with SMTP id r10mr28916478wjz.113.1459897048470; Tue, 05 Apr 2016 15:57:28 -0700 (PDT) Received: from localhost.localdomain (hst-221-11.medicom.bg. [84.238.221.11]) by smtp.gmail.com with ESMTPSA id n3sm21914wja.6.2016.04.05.15.57.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Apr 2016 15:57:27 -0700 (PDT) From: Stanimir Varbanov To: Rob Herring , Mark Rutland , Vinod Koul , Andy Gross Subject: [PATCH v2 4/5] dmaengine: qcom: bam_dma: use correct pipe FIFO size Date: Wed, 6 Apr 2016 01:56:21 +0300 Message-Id: <1459896982-30171-5-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459896982-30171-1-git-send-email-stanimir.varbanov@linaro.org> References: <1459896982-30171-1-git-send-email-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160405_155746_959058_7FCD86A0 X-CRM114-Status: GOOD ( 11.23 ) 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, 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=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,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 isntruct 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 */