* [U-Boot] [PATCH] mmc: fsl_esdhc: fix check_and_invalidate_dcache_range function
@ 2016-05-12 11:12 Yangbo Lu
2016-06-04 5:04 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: Yangbo Lu @ 2016-05-12 11:12 UTC (permalink / raw)
To: u-boot
In function check_and_invalidate_dcache_range(), there are incorrect
start address and end address of the dcache range calculated for
Layerscape platforms. This patch is to fix this issue.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
drivers/mmc/fsl_esdhc.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 7cc61a0..1e04d69 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -285,14 +285,10 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
static void check_and_invalidate_dcache_range
(struct mmc_cmd *cmd,
struct mmc_data *data) {
-#ifdef CONFIG_FSL_LAYERSCAPE
unsigned start = 0;
-#else
- unsigned start = (unsigned)data->dest ;
-#endif
+ unsigned end = 0;
unsigned size = roundup(ARCH_DMA_MINALIGN,
data->blocks*data->blocksize);
- unsigned end = start+size ;
#ifdef CONFIG_FSL_LAYERSCAPE
dma_addr_t addr;
@@ -301,7 +297,10 @@ static void check_and_invalidate_dcache_range
printf("Error found for upper 32 bits\n");
else
start = lower_32_bits(addr);
+#else
+ start = (unsigned)data->dest;
#endif
+ end = start+size;
invalidate_dcache_range(start, end);
}
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-04 5:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-12 11:12 [U-Boot] [PATCH] mmc: fsl_esdhc: fix check_and_invalidate_dcache_range function Yangbo Lu
2016-06-04 5:04 ` York Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox