From: fabio.baltieri@linaro.org (Fabio Baltieri)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] dmaengine: ste_dma40: set dma max seg size
Date: Wed, 12 Dec 2012 10:37:17 +0100 [thread overview]
Message-ID: <1355305041-2338-4-git-send-email-fabio.baltieri@linaro.org> (raw)
In-Reply-To: <1355305041-2338-1-git-send-email-fabio.baltieri@linaro.org>
From: Per Forlin <per.forlin@stericsson.com>
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 <per.forlin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
---
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");
--
1.7.12.1
next prev parent reply other threads:[~2012-12-12 9:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 9:37 [PATCH 0/7] various ste_dma40 fixes Fabio Baltieri
2012-12-12 9:37 ` [PATCH 1/7] dmaengine: ste_dma40: reset priority bit for logical channels Fabio Baltieri
2012-12-12 9:37 ` [PATCH 2/7] dmaengine: ste_dma40: use writel_relaxed for lcxa Fabio Baltieri
2012-12-12 9:37 ` Fabio Baltieri [this message]
2012-12-12 9:37 ` [PATCH 4/7] dmaengine: ste_dma40: limit burst size to 16 Fabio Baltieri
2012-12-12 9:37 ` [PATCH 5/7] dmaengine: ste_dma40: don't check for pm_runtime_suspended() Fabio Baltieri
2012-12-12 9:37 ` [PATCH 6/7] dmaengine: ste_dma40: don't allow high priority dest event lines Fabio Baltieri
2012-12-12 9:37 ` [PATCH 7/7] dmaengine: ste_dma40: support fixed physical channel allocation Fabio Baltieri
2012-12-12 10:16 ` [PATCH 0/7] various ste_dma40 fixes Fabio Baltieri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355305041-2338-4-git-send-email-fabio.baltieri@linaro.org \
--to=fabio.baltieri@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).