Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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
configed. 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>
Acked-by: Dong Aisheng <aisheng.dong@freescale.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Haibo Chen and committed by
Ulf Hansson
fd44954e d407e30b

+16
+16
drivers/mmc/host/sdhci-esdhc-imx.c
··· 32 32 #include "sdhci-esdhc.h" 33 33 34 34 #define ESDHC_CTRL_D3CD 0x08 35 + #define ESDHC_BURST_LEN_EN_INCR (1 << 27) 35 36 /* VENDOR SPEC register */ 36 37 #define ESDHC_VENDOR_SPEC 0xc0 37 38 #define ESDHC_VENDOR_SPEC_SDIO_QUIRK (1 << 1) ··· 1163 1162 writel(0x08100810, host->ioaddr + ESDHC_WTMK_LVL); 1164 1163 host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN; 1165 1164 host->mmc->caps |= MMC_CAP_1_8V_DDR; 1165 + 1166 + /* 1167 + * ROM code will change the bit burst_length_enable setting 1168 + * to zero if this usdhc is choosed to boot system. Change 1169 + * it back here, otherwise it will impact the performance a 1170 + * lot. This bit is used to enable/disable the burst length 1171 + * for the external AHB2AXI bridge, it's usefully especially 1172 + * for INCR transfer because without burst length indicator, 1173 + * the AHB2AXI bridge does not know the burst length in 1174 + * advance. And without burst length indicator, AHB INCR 1175 + * transfer can only be converted to singles on the AXI side. 1176 + */ 1177 + writel(readl(host->ioaddr + SDHCI_HOST_CONTROL) 1178 + | ESDHC_BURST_LEN_EN_INCR, 1179 + host->ioaddr + SDHCI_HOST_CONTROL); 1166 1180 1167 1181 if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200)) 1168 1182 host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;