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: 13867 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2307F23EC8 for ; Mon, 7 Jan 2013 11:23:48 +0000 (UTC) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by fiordland.canonical.com (Postfix) with ESMTP id D1869A188DA for ; Mon, 7 Jan 2013 11:23:47 +0000 (UTC) Received: by mail-vb0-f49.google.com with SMTP id r6so18936053vbi.22 for ; Mon, 07 Jan 2013 03:23:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=hl8ZtUw+UwaJXOctqf43bEwPTNbf1GbuXscdQMrgOAs=; b=AOmvm/OXOz8zf11OYi44DO2FDIBZwLhrZf/NuEwdrJ/YYKsGSoNj9qmXo8PMePMvXK FFWwTVDs/J/50jQOvrWmsQJkXC4F5L7xL+E7wumKStXnRi/Cku/TCtUFiOZBZ5Ahpt7r yhEAhHpW5dYIuVBzu2XNUMRwZhNFqBHDOcZe6ftcAgERSWvU82v14MdVKKMclzKSWvIr +UoG8sjlFsy/J+obxVHL930I5f3Q1GAw2sMiYkTA8osXRomz2djGv2o/aALSs6SEcoFT 1f2kj4zoe57Iknsil/7lezvEMq0xCv0ToNCuw/Ra6YVCgxjGt/uNPTSMCtfK1PbqLXW9 MXHw== X-Received: by 10.58.181.42 with SMTP id dt10mr359202vec.34.1357557827371; Mon, 07 Jan 2013 03:23:47 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp56225veb; Mon, 7 Jan 2013 03:23:46 -0800 (PST) X-Received: by 10.194.76.165 with SMTP id l5mr94856823wjw.14.1357557826485; Mon, 07 Jan 2013 03:23:46 -0800 (PST) Received: from mail-we0-f173.google.com (mail-we0-f173.google.com [74.125.82.173]) by mx.google.com with ESMTPS id dm9si10030233wib.21.2013.01.07.03.23.46 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Jan 2013 03:23:46 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.173 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=74.125.82.173; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.173 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) smtp.mail=fabio.baltieri@linaro.org Received: by mail-we0-f173.google.com with SMTP id z2so9716849wey.18 for ; Mon, 07 Jan 2013 03:23:46 -0800 (PST) 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 Cc: Dan Williams , Linus Walleij , Srinidhi Kasagar , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Per Forlin , Fabio Baltieri 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: ALoCoQm1Eic9pAoqcgM82y7d9DNn8qv+5fwPJOqyvzP1RpYcXqSuGIVwMfJ0lItVc1+hWN3MyUtY 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);