From patchwork Wed Dec 12 09:37:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 13494 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 468EB4C17AA for ; Wed, 12 Dec 2012 10:25:29 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id EF2CFA18A4F for ; Wed, 12 Dec 2012 10:25:28 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so713761iag.11 for ; Wed, 12 Dec 2012 02:25:28 -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=7a+RptyfaznGX7t93FOUyo3wdIfj/hgBuUnpYElIJpc=; b=Fd3v/QUkZJ1v7z08rw91/wtuepjhbeYGDLRLHdOGZeCavge+kmW5VovpsspFOXh+hr w4iLtle+9s3+/RIWOlBkwLzt5XL8oi0XhJQ2ijA8Q9XPqvsSFk5Zo2WrDvytE86pTUej H2ldfxH34IcPnJb0jdpxsh7kqaRHbSHCLOZ8PXGJ5zxF9gMhl+I0OQ4tXWINjYviUfPa QufU4ZjnhvUDxujMsJ/jHuOucMc0YapSW2otYG/B4NCpIYAH8jmxYDEdjPaZeYRvDuLF GCstprJB192B0beOKhDYpLFdgDfStitBkC1JDZniHwjuA5ZeQghDiyH2Y/R8s+GAWiL4 GuzQ== Received: by 10.43.125.133 with SMTP id gs5mr338338icc.54.1355307928409; Wed, 12 Dec 2012 02:25:28 -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 n20csp190149igt; Wed, 12 Dec 2012 02:25:27 -0800 (PST) Received: by 10.14.194.195 with SMTP id m43mr1573822een.44.1355307926827; Wed, 12 Dec 2012 02:25:26 -0800 (PST) Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by mx.google.com with ESMTPS id s8si62148019eeo.127.2012.12.12.02.25.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 02:25:26 -0800 (PST) Received-SPF: neutral (google.com: 74.125.83.46 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=74.125.83.46; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.46 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-ee0-f46.google.com with SMTP id e53so299712eek.19 for ; Wed, 12 Dec 2012 02:25:26 -0800 (PST) Received: by 10.14.194.4 with SMTP id l4mr1569444een.42.1355307926209; Wed, 12 Dec 2012 02:25:26 -0800 (PST) Received: from localhost ([2a01:2003:1:1d66:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id 44sm55039877eek.0.2012.12.12.02.25.25 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 02:25:25 -0800 (PST) Resent-From: Fabio Baltieri Resent-Date: Wed, 12 Dec 2012 11:25:18 +0100 Resent-Message-ID: <20121212102518.GD10536@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 f49sm54815863eep.12.2012.12.12.01.38.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 01:38:19 -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 3/7] dmaengine: ste_dma40: set dma max seg size Date: Wed, 12 Dec 2012 10:37:17 +0100 Message-Id: <1355305041-2338-4-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: ALoCoQnBki/h1lk6Yq4NHSrhhv3X3JYVoDxq+6katjDPewKUv5c0ReRePO1Jzo9Fp6zQmGJaYjAE From: Per Forlin Maximum DMA seg size is (0xffff x data_width). If max seg size is not set it deafults to 64k. This results in failure if transferring 64k in byte mode. Large seg sizes may be supported by splitting large transfer. 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 ae55091..16c96f5 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -345,6 +345,7 @@ struct d40_base { int irq; int num_phy_chans; int num_log_chans; + struct device_dma_parameters dma_parms; struct dma_device dma_both; struct dma_device dma_slave; struct dma_device dma_memcpy; @@ -3363,6 +3364,13 @@ static int __init d40_probe(struct platform_device *pdev) if (err) goto failure; + base->dev->dma_parms = &base->dma_parms; + err = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE); + if (err) { + d40_err(&pdev->dev, "Failed to set dma max seg size\n"); + goto failure; + } + d40_hw_init(base); dev_info(base->dev, "initialized\n");