diff options
author | Kevin Liu <kevinliu@asrmicro.com> | 2017-03-08 15:16:44 +0800 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2017-03-21 21:03:14 +0900 |
commit | fa7720b21ef48f2d0ebd22f609fea7ec2cfe6c16 (patch) | |
tree | 7bf32905342145a1ea0089aef221ad86499d1f20 /drivers/mmc/sdhci.c | |
parent | 83b3248e7ebb4f030b599a13a2559aa1ae31a02c (diff) |
mmc: sdhci: only flush cache for data command
No need to flush cache for command without data.
Signed-off-by: Kevin Liu <kevinliu@asrmicro.com>
Diffstat (limited to 'drivers/mmc/sdhci.c')
-rw-r--r-- | drivers/mmc/sdhci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 93cefd89cd..c94d58db65 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -242,8 +242,10 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT); #ifdef CONFIG_MMC_SDHCI_SDMA - trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE); - flush_cache(start_addr, trans_bytes); + if (data != 0) { + 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); start = get_timer(0); |