diff options
author | Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com> | 2011-02-28 16:06:53 +0100 |
---|---|---|
committer | Robert Marklund <robert.marklund@stericsson.com> | 2011-05-13 10:41:32 +0200 |
commit | 798c0a55f9858f492c621085a466d0704239e640 (patch) | |
tree | fdff80f673e2a5eb2d32a3d2b84d4e3f18539e1c /drivers/mmc | |
parent | aac2d5c56f247331589518fc8213ea3d78fcd76f (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.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 03495a74861..a7bf8470231 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -578,10 +578,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); |