From: Hein Tibosch <hein_tibosch@yahoo.es>
To: Andrew Morton <akpm@linux-foundation.org>,
viresh kumar <viresh.kumar@linaro.org>,
Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Arnd Bergmann <arnd.bergmann@linaro.org>,
"ludovic.desroches" <ludovic.desroches@atmel.com>,
Havard Skinnemoen <havard@skinnemoen.net>,
spear-devel <spear-devel@list.st.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH v3 3/3] avr32: at32ap700x: set DMA slave properties for MCI dw_dmac
Date: Sat, 01 Sep 2012 11:06:30 +0800 [thread overview]
Message-ID: <50417BB6.3020300@yahoo.es> (raw)
The MCI makes use of the dw_dmac driver when DMA is being used.
Due to recent changes to dw_dmac the MCI+DMA driver was broken because:
- a patch in dw_dmac allowed for 64-bit transfers on the memory side, giving
an illegal value of 3 in the SRC/DST_TR_WIDTH register
(http://lkml.org/lkml/2012/1/18/52)
- the SMS field in the CTLL register received the wrong value 0
This patch sets the SMS (Source Master Select) to 1 and limits
the maximum transfer width to 32 bits.
Note: this can only be applied after the previous:
[PATCH v3 2/3] dw_dmac: max_mem_width limits value for SRC/DST_TR_WID register
Signed-off-by: Hein Tibosch <hein_tibosch@yahoo.es>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
---
arch/avr32/mach-at32ap/at32ap700x.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 0445c4f..7250c70 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1356,6 +1356,11 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
slave->sdata.cfg_lo &= ~(DWC_CFGL_HS_DST_POL
| DWC_CFGL_HS_SRC_POL);
+ /* Setup DMA controller: let source be master */
+ slave->sdata.src_master = 1;
+ /* Limit maximum transfer width to 32-bit */
+ slave->sdata.max_mem_width = DW_MEM_WIDTH_32;
+
data->dma_slave = slave;
if (platform_device_add_data(pdev, data,
--
1.7.8.0
reply other threads:[~2012-09-01 3:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=50417BB6.3020300@yahoo.es \
--to=hein_tibosch@yahoo.es \
--cc=akpm@linux-foundation.org \
--cc=arnd.bergmann@linaro.org \
--cc=egtvedt@samfundet.no \
--cc=havard@skinnemoen.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
--cc=nicolas.ferre@atmel.com \
--cc=spear-devel@list.st.com \
--cc=viresh.kumar@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.