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: 13866 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 06C3C23EC8 for ; Mon, 7 Jan 2013 11:23:39 +0000 (UTC) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by fiordland.canonical.com (Postfix) with ESMTP id C87ACA19344 for ; Mon, 7 Jan 2013 11:23:38 +0000 (UTC) Received: by mail-vb0-f50.google.com with SMTP id ft2so7462427vbb.23 for ; Mon, 07 Jan 2013 03:23:38 -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=TQUw4YZsng6lfkBQtv+jfJRX6DrBK6fiPrcDcL/4hx0=; b=fVS13Jz2PuyXzchtZOk/3ja/n7QDOEVAaEOGuagBClySnzy8QLl9kLnOhpCcfbT7RF JZ9Iw5+ncbEfv5uuTkDQnRWpDBKrskJBgZkN5oe6wlAqwuV9YpLQKuQtNenNAsHC72j8 y861VWWDq58FEjK04h0IxHF59Z1tFrCOAcsJ/Twn/wsI+gqOo6tU4/4Wsr0vn6xKxww8 dXZYumZv4TFCwPnuBy5wL7109Fimf+9MIk0aYdsO2Z+1MgnHijVKelBP4IuCKLkVb/pv ys3qPbxfaNa//4UG5nd4cNIMBQb4FcWGHgRgpvyVJdBwZYj7ZTcZ1aCuLmSsCAuq8JDy TeJQ== X-Received: by 10.52.70.205 with SMTP id o13mr71756923vdu.75.1357557818338; Mon, 07 Jan 2013 03:23:38 -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 st5csp56215veb; Mon, 7 Jan 2013 03:23:37 -0800 (PST) X-Received: by 10.194.76.137 with SMTP id k9mr95506064wjw.29.1357557815997; Mon, 07 Jan 2013 03:23:35 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) by mx.google.com with ESMTPS id be9si5617409wjb.75.2013.01.07.03.23.35 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Jan 2013 03:23:35 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.181 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=74.125.82.181; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.181 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-f181.google.com with SMTP id t11so9659370wey.26 for ; Mon, 07 Jan 2013 03:23:35 -0800 (PST) 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 Cc: Dan Williams , Linus Walleij , Srinidhi Kasagar , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Per Forlin , Fabio Baltieri 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: ALoCoQkUrfMhrPPTDuwWD4Ft3k5h8DaUMqsqPOMjPiXbGBWx16EZFilJcpDi8TAkvdAD9/FxpTAm 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");