]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: sdhci: fix the "misaligned operation at range" for cache
authorJaehoon Chung <jh80.chung@samsung.com>
Thu, 13 Oct 2016 01:33:06 +0000 (10:33 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 28 Oct 2016 02:02:16 +0000 (11:02 +0900)
This pathc is fixed the below thing.
If misaligned the cache range, Just flush to CACHLINE_SIZE.
"CACHE: Misaligned operation at range [7ae55b007ae55b08]"

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/sdhci.c

index 837c53842b3802700ca192692c9ead0e2d220590..10ff57ec8c7758f6a67eb30617becccecfc4a720 100644 (file)
@@ -242,6 +242,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
 
        sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT);
 #ifdef CONFIG_MMC_SDMA
+       trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE);
        flush_cache(start_addr, trans_bytes);
 #endif
        sdhci_writew(host, SDHCI_MAKE_CMD(cmd->cmdidx, flags), SDHCI_COMMAND);