From: Markus Niebel Date: Fri, 24 Oct 2014 09:44:53 +0000 (+0200) Subject: mmc: fsl_esdhc: fix f_max retrieval during init X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=3b4b9a3377d6e7cba6060497b02644f9ff2ac67a;p=u-boot.git mmc: fsl_esdhc: fix f_max retrieval during init for multi instance API we use struct fsl_esdhc_cfg to pass the clock rate. Do not set f_max from global data, since this is wrong for multi instance case. Signed-off-by: Markus Niebel Acked-by: Stefano Babic Tested-by: Eric Nelson Reviewed-by: York Sun --- diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 2640607248..8a1a461ccf 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -610,7 +610,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg) #endif cfg->cfg.f_min = 400000; - cfg->cfg.f_max = min(gd->arch.sdhc_clk, 52000000); + cfg->cfg.f_max = min(cfg->sdhc_clk, 52000000); cfg->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;