aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorStefan Nilsson XK <stefan.xk.nilsson@stericsson.com>2011-02-28 16:06:53 +0100
committerSebastian RASMUSSEN <sebastian.rasmussen@stericsson.com>2011-03-01 16:34:56 +0100
commit1e535a07cccea1957cf4be91834725932e3f0018 (patch)
treee28366b47b0b7d141b58524cdf5ca8fccdc7f5c5 /drivers/mmc
parented7da0dad0bfcdbf1c0d98a0fe253466f45b293a (diff)
MMCI: Increase HW flow control workaround
There is a HW pecularity when writing packets with size <= 8 bytes to PL18X. Previously HW flow control was disabled for sizes < 8 bytes, but it needs to be disabled also for sizes == 8 bytes. Since HW flow control is not really needed for anything that fits in the HW FIFO of PL18X, we now instead disable HW flow control for any write operation that is smaller than or equal to the FIFO size. ST-Ericsson ID: ER326261 Change-Id: Ifa27d47a4c79b2c4542bba5cf2cfc30297403cd0 Signed-off-by: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17137 Reviewed-by: QATOOLS Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com> Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index a77686d916c..250ddf65a29 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -652,10 +652,14 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
/*
* The ST Micro variant for SDIO transfer sizes
- * less then 8 bytes should have clock H/W flow
- * control disabled.
- */
- if ((host->size < 8) && (data->flags & MMC_DATA_WRITE))
+ * 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.
+ */
+ if ((host->size <= variant->fifosize) &&
+ (data->flags & MMC_DATA_WRITE))
writel(readl(host->base + MMCICLOCK) &
~variant->clkreg_enable,
host->base + MMCICLOCK);