From 339efff8f0dd0bb236b26c80963de7a1f64c8a1e Mon Sep 17 00:00:00 2001 From: Stefan Nilsson XK Date: Mon, 21 Nov 2011 16:42:20 +0100 Subject: mmc: mmci: Use HWFC when possible HW flow control should not be used for write transfers less then 8 bytes. All other transfers should use HW flow control. ST-Ericsson Linux next: NA ST-Ericsson ID: 398871 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I51044d26cfc7df033852becbbc6e796396dfb45f Signed-off-by: Stefan Nilsson XK Signed-off-by: Fredrik Soderstedt Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/40191 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Ulf HANSSON --- drivers/mmc/host/mmci.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 6e03104b7a2..eaeae3232db 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -696,14 +696,11 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) datactrl |= MCI_ST_DPSM_SDIOEN; /* - * The ST Micro variant for SDIO transfer sizes - * less then or equal to 8 bytes needs to have clock - * H/W flow control disabled. Since flow control is - * not really needed for anything that fits in the - * FIFO, we can disable it for any write smaller - * than the FIFO size. + * The ST Micro variant for SDIO write transfer sizes + * less then 8 bytes needs to have clock H/W flow + * control disabled. */ - if ((host->size <= variant->fifosize) && + if ((host->size < 8) && (data->flags & MMC_DATA_WRITE)) clk = host->clk_reg & ~variant->clkreg_enable; else -- cgit v1.2.3