From patchwork Mon Jan 7 11:21:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 1940711 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 24ABA3FE37 for ; Mon, 7 Jan 2013 11:27:59 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TsAoJ-0000db-Aq; Mon, 07 Jan 2013 11:24:07 +0000 Received: from mail-we0-f176.google.com ([74.125.82.176]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TsAnz-0000XG-5i for linux-arm-kernel@lists.infradead.org; Mon, 07 Jan 2013 11:23:47 +0000 Received: by mail-we0-f176.google.com with SMTP id r5so9572411wey.7 for ; Mon, 07 Jan 2013 03:23:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=hl8ZtUw+UwaJXOctqf43bEwPTNbf1GbuXscdQMrgOAs=; b=IAWtauadydOm/JHL05hVDZjUzYzHGW28aAplkuT0Nelnwt/9qEx/bu9l7N8AoGXVqq VjmK6zz/jlwFlBQcNEGSkG9iNPrrTDW9vx0Rk8Vi1CP0aV00yBA+t9cXwa+C07YD/IHc uLXs689pLtPaqssgv1T7E1bsnm7GdhyblMsgBDgTK1pWk/0OK9HFle6HvSRw0OYy5/AT rylAeHkOV7LD84x8g9K3Fw1ksW65hV4tnciOzHHxb0CtV/lr5obpPZVgs/wwjDdiMH3z TExRUkzbRQghGiC1SA9yJNvpOi6K4Hir7+gjLAY/nEnkwBu7CEsjzDzFl+8PdmKyu0of YxxQ== X-Received: by 10.180.8.130 with SMTP id r2mr8759344wia.28.1357557826112; Mon, 07 Jan 2013 03:23:46 -0800 (PST) Received: from localhost ([2a01:2029:1:11e3:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id bz12sm13054527wib.5.2013.01.07.03.23.39 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Jan 2013 03:23:45 -0800 (PST) From: Fabio Baltieri To: Vinod Koul Subject: [PATCH 04/16] dmaengine: ste_dma40: limit burst size to 16 Date: Mon, 7 Jan 2013 12:21:46 +0100 Message-Id: <1357557718-15676-5-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1357557718-15676-1-git-send-email-fabio.baltieri@linaro.org> References: <1357557718-15676-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQlASRaRy6pekI4Zg3N3ATuWvkfMVONLrqRjt32hx0RjXqzFRz7h2vQBYyiJ1wCWyjpKnkQH X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130107_062347_686827_BE001329 X-CRM114-Status: GOOD ( 10.62 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.176 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Srinidhi Kasagar , Fabio Baltieri , Linus Walleij , linux-kernel@vger.kernel.org, Per Forlin , Dan Williams , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Per Forlin The client is not aware of the maximum burst size in the dma driver. If the size exceeds 16 set max to 16. Signed-off-by: Per Forlin Acked-by: Linus Walleij Signed-off-by: Fabio Baltieri --- drivers/dma/ste_dma40.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index f5724d9..2d0c63d 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -2578,6 +2578,14 @@ static int d40_set_runtime_config(struct dma_chan *chan, return -EINVAL; } + if (src_maxburst > 16) { + src_maxburst = 16; + dst_maxburst = src_maxburst * src_addr_width / dst_addr_width; + } else if (dst_maxburst > 16) { + dst_maxburst = 16; + src_maxburst = dst_maxburst * dst_addr_width / src_addr_width; + } + ret = dma40_config_to_halfchannel(d40c, &cfg->src_info, src_addr_width, src_maxburst);