From: Seungwon Jeon <tgih.jun@samsung.com>
To: 'linux-mmc' <linux-mmc@vger.kernel.org>
Cc: 'Chris Ball' <cjb@laptop.org>,
'James Hogan' <james@albanarts.com>,
'Will Newton' <will.newton@imgtec.com>
Subject: [PATCH] mmc: dw_mmc: Fix disableing DMA in Non-IDMAC
Date: Mon, 20 Feb 2012 11:01:43 +0900 [thread overview]
Message-ID: <001e01ccef73$97aee200$c70ca600$%jun@samsung.com> (raw)
dw_mci_pre_dma_transfer() is valid only if internal DMA. In case of
using other DMA it returns -ENOSYS. It prevents the DMA operations.
This patch makes dw_mci_pre_dma_transfer() effective in all DMA case.
Reported-by: James Hogan <james@albanarts.com>
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 692c3ba..bf3c9b4 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -429,6 +429,15 @@ static int dw_mci_idmac_init(struct dw_mci *host)
return 0;
}
+static struct dw_mci_dma_ops dw_mci_idmac_ops = {
+ .init = dw_mci_idmac_init,
+ .start = dw_mci_idmac_start_dma,
+ .stop = dw_mci_idmac_stop_dma,
+ .complete = dw_mci_idmac_complete_dma,
+ .cleanup = dw_mci_dma_cleanup,
+};
+#endif /* CONFIG_MMC_DW_IDMAC */
+
static int dw_mci_pre_dma_transfer(struct dw_mci *host,
struct mmc_data *data,
bool next)
@@ -468,22 +477,6 @@ static int dw_mci_pre_dma_transfer(struct dw_mci *host,
return sg_len;
}
-static struct dw_mci_dma_ops dw_mci_idmac_ops = {
- .init = dw_mci_idmac_init,
- .start = dw_mci_idmac_start_dma,
- .stop = dw_mci_idmac_stop_dma,
- .complete = dw_mci_idmac_complete_dma,
- .cleanup = dw_mci_dma_cleanup,
-};
-#else
-static int dw_mci_pre_dma_transfer(struct dw_mci *host,
- struct mmc_data *data,
- bool next)
-{
- return -ENOSYS;
-}
-#endif /* CONFIG_MMC_DW_IDMAC */
-
static void dw_mci_pre_req(struct mmc_host *mmc,
struct mmc_request *mrq,
bool is_first_req)
--
1.7.0.4
next reply other threads:[~2012-02-20 2:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-20 2:01 Seungwon Jeon [this message]
2012-02-20 5:59 ` [PATCH] mmc: dw_mmc: Fix disableing DMA in Non-IDMAC Namjae Jeon
[not found] ` <CAAG0J9-wRLj29=LztT4Ppi7q6Q=4dm29vHODk9KdVAGWKMJgUw@mail.gmail.com>
2012-02-20 12:10 ` James Hogan
2012-02-20 17:07 ` Chris Ball
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='001e01ccef73$97aee200$c70ca600$%jun@samsung.com' \
--to=tgih.jun@samsung.com \
--cc=cjb@laptop.org \
--cc=james@albanarts.com \
--cc=linux-mmc@vger.kernel.org \
--cc=will.newton@imgtec.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