From patchwork Mon Jan 7 11:21:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 1940701 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 7F2F83FE37 for ; Mon, 7 Jan 2013 11:27:43 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TsAo2-0000YN-8k; Mon, 07 Jan 2013 11:23:50 +0000 Received: from mail-wg0-f44.google.com ([74.125.82.44]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TsAnp-0000Un-9w for linux-arm-kernel@lists.infradead.org; Mon, 07 Jan 2013 11:23:38 +0000 Received: by mail-wg0-f44.google.com with SMTP id dr12so9601523wgb.35 for ; Mon, 07 Jan 2013 03:23:35 -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=TQUw4YZsng6lfkBQtv+jfJRX6DrBK6fiPrcDcL/4hx0=; b=FSTIXjY3MwyQck010w/4MErNZPF9ywU7axAGtEYBGD2YscmefRd7EO7x1L1agxiNWN grb0u88nfEcuLdk8eNQIZs986UluQQbWcZvP3EQigrdehhWc9aY/FoDFTPCkGkqbsuns XYyMDg8c6G1Jw6BpXsHSTG5An5KqPfFOuIbcPY/HmnIJCubqWkOEwfOeNgAgY9lWAbTn bM9gnq/OZPLRvxIypt4PdznQpu11OQIb9uKdMP4pZZ9nYgIb+PD4kh0RKPGc4xVObJ8y SutYCNTKhrlEw7LAhHiOquJckdKUhPUo7ws/lCTk253p+4X6zw6RnljJxIMBYuHYx6nu QXmA== X-Received: by 10.180.95.228 with SMTP id dn4mr8704677wib.16.1357557815611; Mon, 07 Jan 2013 03:23:35 -0800 (PST) Received: from localhost ([2a01:2029:1:11e3:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id s16sm12134855wii.0.2013.01.07.03.23.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 07 Jan 2013 03:23:34 -0800 (PST) From: Fabio Baltieri To: Vinod Koul Subject: [PATCH 03/16] dmaengine: ste_dma40: set dma max seg size Date: Mon, 7 Jan 2013 12:21:45 +0100 Message-Id: <1357557718-15676-4-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: ALoCoQmgQR91h15c1bd6EQckZ3U4eqNFm7LmF487xeuYdB9d/56zXHX1f8sS2vtn7p3yd4kntCaH X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130107_062337_677932_80181BD8 X-CRM114-Status: GOOD ( 11.51 ) 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.44 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 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 23c5573..f5724d9 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -344,6 +344,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; @@ -3362,6 +3363,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");