All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mmc: sdhci: only flush cache for data command
@ 2017-03-08  7:16 ` Kevin Liu
  2017-03-14  7:08   ` Jaehoon Chung
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Liu @ 2017-03-08  7:16 UTC (permalink / raw)
  To: u-boot

No need to flush cache for command without data.

Signed-off-by: Kevin Liu <kevinliu@asrmicro.com>
---
 drivers/mmc/sdhci.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 93cefd8..c94d58d 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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] mmc: sdhci: only flush cache for data command
  2017-03-08  7:16 ` [U-Boot] [PATCH] mmc: sdhci: only flush cache for data command Kevin Liu
@ 2017-03-14  7:08   ` Jaehoon Chung
  0 siblings, 0 replies; 2+ messages in thread
From: Jaehoon Chung @ 2017-03-14  7:08 UTC (permalink / raw)
  To: u-boot

Hi Kevin,

On 03/08/2017 04:16 PM, Kevin Liu wrote:
> No need to flush cache for command without data.
> 
> Signed-off-by: Kevin Liu <kevinliu@asrmicro.com>

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> ---
>  drivers/mmc/sdhci.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 93cefd8..c94d58d 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);
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-14  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170308200522epcas1p4398981d5d0d9fda15a5e76c56ca6a911@epcas1p4.samsung.com>
2017-03-08  7:16 ` [U-Boot] [PATCH] mmc: sdhci: only flush cache for data command Kevin Liu
2017-03-14  7:08   ` Jaehoon Chung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.