[U-Boot] [Patch] mmc: fsl_esdhc: fix f_max retrieval during init

Markus Niebel list-09_u-boot at tqsc.de
Fri Oct 24 11:44:53 CEST 2014


From: Markus Niebel <Markus.Niebel at tq-group.com>

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 <Markus.Niebel at tq-group.com>
---
 drivers/mmc/fsl_esdhc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 2640607..8a1a461 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;
 
-- 
2.1.1



More information about the U-Boot mailing list