mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] MCI imx-esdhc: Fix cache flush/inval for multi block support
Date: Tue,  5 Jul 2011 09:31:52 +0200	[thread overview]
Message-ID: <1309851114-2069-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1309851114-2069-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mci/imx-esdhc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 2937156..7595a93 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -257,10 +257,10 @@ esdhc_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, struct mci_data *data)
 			return err;
 		if (data->flags & MMC_DATA_WRITE) {
 			dma_flush_range((unsigned long)data->src,
-				(unsigned long)(data->src + 512));
+				(unsigned long)(data->src + data->blocks * 512));
 		} else
 			dma_clean_range((unsigned long)data->src,
-				(unsigned long)(data->src + 512));
+				(unsigned long)(data->src + data->blocks * 512));
 
 	}
 
@@ -317,7 +317,7 @@ esdhc_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, struct mci_data *data)
 
 		if (data->flags & MMC_DATA_READ) {
 			dma_inv_range((unsigned long)data->dest,
-					(unsigned long)(data->dest + 512));
+					(unsigned long)(data->dest + data->blocks * 512));
 		}
 #endif
 	}
-- 
1.7.5.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-07-05  7:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  7:31 updates for imx-esdhc controller Sascha Hauer
2011-07-05  7:31 ` Sascha Hauer [this message]
2011-07-05  7:31 ` [PATCH 2/3] MCI imx-esdhc: Fix multiblock transfers on i.MX53 Sascha Hauer
2011-07-05  7:31 ` [PATCH 3/3] MCI imx-esdhc: remove unnecessary large delay Sascha Hauer

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=1309851114-2069-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@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