[PATCH 1/3] MCI imx-esdhc: Fix cache flush/inval for multi block support
Sascha Hauer
s.hauer at pengutronix.de
Tue Jul 5 03:31:52 EDT 2011
Signed-off-by: Sascha Hauer <s.hauer at 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
More information about the barebox
mailing list