Skip to content
Snippets Groups Projects
Commit fa7720b2 authored by Kevin Liu's avatar Kevin Liu Committed by Jaehoon Chung
Browse files

mmc: sdhci: only flush cache for data command


No need to flush cache for command without data.

Signed-off-by: default avatarKevin Liu <kevinliu@asrmicro.com>
parent 83b3248e
No related branches found
No related tags found
No related merge requests found
...@@ -242,8 +242,10 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, ...@@ -242,8 +242,10 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT); sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT);
#ifdef CONFIG_MMC_SDHCI_SDMA #ifdef CONFIG_MMC_SDHCI_SDMA
if (data != 0) {
trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE); trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE);
flush_cache(start_addr, trans_bytes); flush_cache(start_addr, trans_bytes);
}
#endif #endif
sdhci_writew(host, SDHCI_MAKE_CMD(cmd->cmdidx, flags), SDHCI_COMMAND); sdhci_writew(host, SDHCI_MAKE_CMD(cmd->cmdidx, flags), SDHCI_COMMAND);
start = get_timer(0); start = get_timer(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment