The ESDHC3 instance is common between iMX50 and iMX53. Extend the required quirk also to iMX50 fixing a problem that data could not be written to an eMMC.
Fixes: 1713fa5bf0f9 ("mci: imx-esdhc-pbl: fix prediv setting") Signed-off-by: Alexander Kurz <ak...@blala.de> --- drivers/mci/imx-esdhc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c index 0ae0bb4ede..ae02d80443 100644 --- a/drivers/mci/imx-esdhc.c +++ b/drivers/mci/imx-esdhc.c @@ -22,6 +22,7 @@ #include <gpio.h> #include <of_device.h> #include <mach/imx/generic.h> +#include <mach/imx/imx50-regs.h> #include <mach/imx/imx53-regs.h> #include "sdhci.h" @@ -97,8 +98,9 @@ static void set_sysctl(struct mci_host *mci, u32 clock, bool ddr) if (esdhc_is_layerscape(host)) sdhc_clk >>= 1; - /* For i.MX53 eSDHCv3, SYSCTL.SDCLKFS may not be set to 0. */ - if (cpu_is_mx53() && host->sdhci.base == (void *)MX53_ESDHC3_BASE_ADDR) + /* For i.MX50 and i.MX53 eSDHCv3, SYSCTL.SDCLKFS may not be set to 0. */ + if ((cpu_is_mx50() && host->sdhci.base == (void *)MX50_ESDHC3_BASE_ADDR) + || (cpu_is_mx53() && host->sdhci.base == (void *)MX53_ESDHC3_BASE_ADDR)) pre_div = 2; else pre_div = 1; -- 2.39.5