mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-03 21:12:10 +02:00
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>
This commit is contained in:
parent
aff32df522
commit
5b3e5b5696
@ -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
|
||||||
trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE);
|
if (data != 0) {
|
||||||
flush_cache(start_addr, trans_bytes);
|
trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE);
|
||||||
|
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user