summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaibo Chen <haibo.chen@freescale.com>2015-04-16 17:04:46 +0800
committerguoyin.chen <guoyin.chen@freescale.com>2015-05-08 17:26:35 +0800
commit84f1eda20dd93cf3f1ed4f0b14fbbcb837794ada (patch)
treefe92ae05f7c0d18c82060c44c59897379419bd76
parentc8c83ea958229176789e3791cefc435b9ff4629f (diff)
MLK-10672 mmc: sdhci-esdhc-imx: set back the burst_length_enable bit to 1
Currently we find that if a usdhc is choosed to boot system, then ROM code will set the burst length enable bit of this usdhc as 0. This will make performance drop a lot if this usdhc's burst length is 16. So this patch set back the burst_length_enable bit as 1, which is the default value, and means burst length is enabled for INCR. Signed-off-by: Haibo Chen <haibo.chen@freescale.com> (cherry picked from commit 1e48e8cb56019a120a82bc112177eab4c85b9f21)
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 708308db4ef7..2759d6ba6f81 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -33,6 +33,7 @@
#include "sdhci-esdhc.h"
#define ESDHC_CTRL_D3CD 0x08
+#define ESDHC_BURST_LEN_EN_INCR (1 << 27)
/* VENDOR SPEC register */
#define ESDHC_VENDOR_SPEC 0xc0
#define ESDHC_VENDOR_SPEC_SDIO_QUIRK (1 << 1)
@@ -1144,6 +1145,17 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
writel(0x10401040, host->ioaddr + ESDHC_WTMK_LVL);
else
writel(0x08100810, host->ioaddr + ESDHC_WTMK_LVL);
+
+ /*
+ * ROM code will change the burst_length_enable setting to
+ * zero if this usdhc is choosed to boot system. Change it
+ * back here, otherwise it will impact the performance a
+ * lot if the burst length is 16.
+ */
+ writel(readl(host->ioaddr + SDHCI_HOST_CONTROL)
+ | ESDHC_BURST_LEN_EN_INCR,
+ host->ioaddr + SDHCI_HOST_CONTROL);
+
host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER;
host->mmc->caps |= MMC_CAP_1_8V_DDR;