From patchwork Wed Dec 12 09:37:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 13495 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 65C294C17AA for ; Wed, 12 Dec 2012 10:25:30 +0000 (UTC) Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169]) by fiordland.canonical.com (Postfix) with ESMTP id 2A66AA18A4F for ; Wed, 12 Dec 2012 10:25:30 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id c14so1467218ieb.14 for ; Wed, 12 Dec 2012 02:25:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :resent-from:resent-date:resent-message-id:resent-to:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=OaJt1An9TCdAWD1BEUOJf8cA8mVGWiYVBFkamksvJ2c=; b=E2MtWI8QQBm6EukZQCinPlkZRiHy7Ck4r19CWIOV8L49iciA0wgD8vfkX5IpyAevgt 6HbMh6J0zMUaM6CApzVu4bCIKgAlX4B0q0yWK+/OHMR72kOkQA7tKIoh059OuwOBRhG7 zogSXlP8Tnt68uJkdKjR+t8MxCGz6TmPVoYo7sUBqHgJgHRMpp24wsMciZBjiZD40N0t 58msrgXtylTQkYOhvSE1pvz9UgP2rkLURZVRkrWCtXYM+1HnRODzfvvZ8fZcj8L9TKjW w6b6DJT2Az63ggAN8mVsJ4RovYXXhKXKn3KkrnHwoswJOW0zIleTolBtnUVxBkCRBsB6 h12g== Received: by 10.50.42.168 with SMTP id p8mr12727108igl.57.1355307929604; Wed, 12 Dec 2012 02:25:29 -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.50.67.148 with SMTP id n20csp190151igt; Wed, 12 Dec 2012 02:25:29 -0800 (PST) Received: by 10.14.194.195 with SMTP id m43mr1574108een.44.1355307929058; Wed, 12 Dec 2012 02:25:29 -0800 (PST) Received: from mail-ea0-f178.google.com (mail-ea0-f178.google.com [209.85.215.178]) by mx.google.com with ESMTPS id l1si62214519een.1.2012.12.12.02.25.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 02:25:29 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=209.85.215.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.178 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-ea0-f178.google.com with SMTP id k11so179754eaa.37 for ; Wed, 12 Dec 2012 02:25:28 -0800 (PST) Received: by 10.14.184.134 with SMTP id s6mr1557748eem.43.1355307928486; Wed, 12 Dec 2012 02:25:28 -0800 (PST) Received: from localhost ([2a01:2003:1:1d66:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id b2sm55038661eep.9.2012.12.12.02.25.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 02:25:28 -0800 (PST) Resent-From: Fabio Baltieri Resent-Date: Wed, 12 Dec 2012 11:25:20 +0100 Resent-Message-ID: <20121212102520.GE10536@balto.lan> Resent-To: patches@linaro.org Received: from localhost ([2a01:2003:1:1d66:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id f49sm54816163eep.12.2012.12.12.01.38.20 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 01:38:22 -0800 (PST) From: Fabio Baltieri To: Linus Walleij , Srinidhi Kasagar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Per Forlin , Fabio Baltieri Subject: [PATCH 4/7] dmaengine: ste_dma40: limit burst size to 16 Date: Wed, 12 Dec 2012 10:37:18 +0100 Message-Id: <1355305041-2338-5-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1355305041-2338-1-git-send-email-fabio.baltieri@linaro.org> References: <1355305041-2338-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQmbP2bvEKZpX7VTJO4KvyPRqimmgPkViftlOONww/bSgdKP+EMn1BS2q6D5okE/uOheiZHy 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 16c96f5..0b80ee9 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -2579,6 +2579,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);