From: Daniel Mack <zonque@gmail.com>
To: linux-mmc@vger.kernel.org
Cc: Daniel Mack <zonque@gmail.com>, Venkatraman S <svenkatr@ti.com>,
Chris Ball <cjb@laptop.org>,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
linux-omap@vger.kernel.org, Matt Porter <mporter@ti.com>,
Russell King <rmk+kernel@arm.linux.org.uk>
Subject: [PATCH 2/4] MMC: omap_hsmmc: fix DMA config block
Date: Fri, 12 Oct 2012 12:58:13 +0200 [thread overview]
Message-ID: <1350039495-360-3-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1350039495-360-1-git-send-email-zonque@gmail.com>
The .direction field of the config passed to dmaengine_slave_config()
must be set in order to make the generic code store the configured bus
width.
Without this patch, I keep getting the following error on a AM33xx
board:
[ 1.963144] edma-dma-engine edma-dma-engine.0: Undefined slave buswidth
[ 1.970158] omap_hsmmc mmc.4: prep_slave_sg() failed
[ 1.975454] mmc1: error -1 whilst initialising SD card
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Venkatraman S <svenkatr@ti.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: linux-omap@vger.kernel.org
Cc: Matt Porter <mporter@ti.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/mmc/host/omap_hsmmc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 4b70823..2c57b0d 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1260,6 +1260,8 @@ static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host,
cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
cfg.src_maxburst = data->blksz / 4;
cfg.dst_maxburst = data->blksz / 4;
+ cfg.direction = data->flags & MMC_DATA_WRITE ?
+ DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
ret = dmaengine_slave_config(chan, &cfg);
if (ret)
@@ -1270,8 +1272,8 @@ static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host,
return ret;
tx = dmaengine_prep_slave_sg(chan, data->sg, data->sg_len,
- data->flags & MMC_DATA_WRITE ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
+ cfg.direction,
+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
if (!tx) {
dev_err(mmc_dev(host->mmc), "prep_slave_sg() failed\n");
/* FIXME: cleanup */
--
1.7.11.4
next prev parent reply other threads:[~2012-10-12 10:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-12 10:58 [PATCH 0/4] MMC: some omap_hsmmc fixes Daniel Mack
2012-10-12 10:58 ` [PATCH 1/4] MMC: omap_hsmmc: set platform data after probe from DT node Daniel Mack
2012-10-12 14:29 ` Daniel Mack
2012-10-12 14:56 ` Balaji T K
2012-10-12 15:14 ` Daniel Mack
2012-10-12 15:23 ` Balaji T K
2012-10-13 0:05 ` Grant Likely
2012-10-13 8:05 ` Daniel Mack
2012-10-13 8:48 ` Grant Likely
2012-10-13 8:53 ` Daniel Mack
2012-10-13 12:37 ` Grant Likely
2012-10-12 10:58 ` Daniel Mack [this message]
2012-10-12 11:07 ` [PATCH 2/4] MMC: omap_hsmmc: fix DMA config block Porter, Matt
2012-10-12 11:12 ` Russell King - ARM Linux
2012-10-12 14:19 ` Daniel Mack
2012-10-12 10:58 ` [PATCH 3/4] MMC: omap_hsmmc: claim pinctrl at probe time Daniel Mack
2012-10-12 11:08 ` Linus Walleij
2012-10-12 10:58 ` [PATCH 4/4] MMC: omap_hsmmc: add DT property for max bus frequency Daniel Mack
2012-10-12 15:25 ` Rob Herring
2012-10-12 15:26 ` Daniel Mack
2012-10-13 9:01 ` [PATCH 0/4] MMC: some omap_hsmmc fixes Daniel Mack
2012-10-15 16:07 ` Venkatraman S
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=1350039495-360-3-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=cjb@laptop.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mporter@ti.com \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=rob.herring@calxeda.com \
--cc=svenkatr@ti.com \
/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