From patchwork Tue Dec 1 09:14:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 7734471 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 BBCE69F1C2 for ; Tue, 1 Dec 2015 09:19:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D76C1205B3 for ; Tue, 1 Dec 2015 09:19:32 +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 199D820571 for ; Tue, 1 Dec 2015 09:19: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 1a3h43-0000ix-VL; Tue, 01 Dec 2015 09:17:36 +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 1a3h2s-0007k4-GV for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2015 09:16:36 +0000 Received: by wmww144 with SMTP id w144so4130791wmw.0 for ; Tue, 01 Dec 2015 01:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Nsv7MXVJh2dkGGF11w8uAFVC23CCxgk5LEXEzrK4iec=; b=Qiwv7mMhBgh+63Lgu8NKUKK7XQQfh+NEHgpE2fS79/RRMOkaecldV+XsZjtdDrZaFx SdVAaw0v6WKMhg4bmOqMZIsCKU+iWvgzttEfjAFa8g+XnfDG1CscYQ1p6IKgFsFFiieA EqXVJGaHZMiLl1YBZK/VJKdlpEE9r/f281kZdPR9NWRqQdY++XSBm8iomp0WkuVYxwEx s4F1X8RzKcIkSstwH7TAa6R1S3/gZv2eNuIrh/aEiNTNYa4aNESVp4VgkecbAV4IJYDl 0t/uc7kswHtkfP/Hj5q+udc9JjyN/Zj7Ahrcl4Nz33jaL/7LiTq0ywYxeRp/USC3S3y/ obYQ== 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=Nsv7MXVJh2dkGGF11w8uAFVC23CCxgk5LEXEzrK4iec=; b=CR0BGwXIR/A5MAkuVIFCmRkVAREyPwfz9fzmUmXe64l10amIJ9OT/upEO6Nv2+HA9D sIjXaYsQXGa9FdvkEtTr7i4pjI/NUST7zsrqACWrsfbxMHoRaU5Dcu/RM1sYwTuMvADO i0E5MHMuvA27EYbGssQDOeZ8U+Ex/7sfoNBsNVsW59IoJA1JEoY10SVLASSWeRxL1B8D cbBsGyptsTeMmPAPS8gj+3WCCSIXnGIZ4dKhMK9phnR1l36GNKShFmlCXd+ftSSDZyZy WkVAntymVXhIAJPcauTZIoW0q9sxlZnR6GAmcRm+FVofJlMHT5Jwjr//vUf7NU/ydl9u Xznw== X-Gm-Message-State: ALoCoQkNiGP1aHVhpklarS5ilGvUhF4SIuG+c/JiI1ZEzzMgs50Fd76DLn49BAcXr1j41MDgvBB3 X-Received: by 10.28.172.2 with SMTP id v2mr34899929wme.10.1448961366043; Tue, 01 Dec 2015 01:16:06 -0800 (PST) Received: from mms734.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id t64sm25290428wmf.23.2015.12.01.01.16.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Dec 2015 01:16:05 -0800 (PST) From: Stanimir Varbanov To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, Vinod Koul Subject: [PATCH 3/4] dmaengine: qcom_bam_dma: use correct pipe FIFO size Date: Tue, 1 Dec 2015 11:14:58 +0200 Message-Id: <1448961299-15161-4-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1448961299-15161-1-git-send-email-stanimir.varbanov@linaro.org> References: <1448961299-15161-1-git-send-email-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151201_011623_384866_79C6F8C0 X-CRM114-Status: GOOD ( 11.58 ) X-Spam-Score: -2.6 (--) 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: Mark Rutland , Archit Taneja , Pawel Moll , Ian Campbell , Stanimir Varbanov , Rob Herring , Andy Gross 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=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_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 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 0f06f3b7a72b..6d290de9ab2b 100644 --- a/drivers/dma/qcom_bam_dma.c +++ b/drivers/dma/qcom_bam_dma.c @@ -458,7 +458,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 */