According to spec, the pre_div for imx6q should be 1, or the biggest clock rate we can get is a half of host clock rate. This may cause we can not get the proper clock rate as we want. e.g. if the desired clock is 200Mhz, however, the host clock is 200Mhz too, then it causes the actual clock we get is 100Mhz due to pre_div is 2. Signed-off-by: Dong Aisheng <b29396@xxxxxxxxxxxxx> --- drivers/mmc/host/sdhci-esdhc.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc.h b/drivers/mmc/host/sdhci-esdhc.h index 86fcd5b..c8a773b 100644 --- a/drivers/mmc/host/sdhci-esdhc.h +++ b/drivers/mmc/host/sdhci-esdhc.h @@ -66,6 +66,9 @@ static inline void esdhc_set_clock(struct sdhci_host *host, unsigned int clock, u32 temp, val; dev = mmc_dev(host->mmc); + if (of_device_is_compatible(dev->of_node, "fsl,imx6q-usdhc")) + pre_div = 1; + if (clock == 0) { if (of_device_is_compatible(dev->of_node, "fsl,imx6q-usdhc")) { val = readl(host->ioaddr + ESDHC_VENDOR_SPEC); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html