mmc: fsl_esdhc: fix f_max retrieval during init
PATCH 1/1 mmc: fsl_esdhc: fix f_max retrieval during init
From: Markus Niebel <[email protected]>
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.
--- drivers/mmc/fsl_esdhc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/fsl_esdhc.c +1 -1
@@ -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 ;
Signature · 1 line
2.1.1
PATCH 1/1 mmc: fsl_esdhc: fix f_max retrieval during init
Hi Markus,
Quoted 16 lines · Markus Niebel
From: Markus Niebel <[email protected]>
for multi instance API we use struct
fsl_esdhc_cfgto pass the clock rate. Do not setf_maxfrom global data, since this is wrong for multi instance case.Signed-off-by Markus Niebel <[email protected]>--- drivers/mmc/fsl_esdhc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/fsl_esdhc.c +0
-0
drivers/mmc/fsl_esdhc.c int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg) · line 615
Quoted 7 lines
drivers/mmc/fsl_esdhc.c +1
-1@@ -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 ;
Just a note for PowerPC users: as far I can see, PowerPC boards should continue to work, because fsl_esdhc_mmc_init() backup gd->arch.sdhc into cfg->sdhc_clk. Anyway, it would be not bad if patch could be tested even on those boards.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 1/1 mmc: fsl_esdhc: fix f_max retrieval during init
In reply to Markus NiebelHi Markus,
Quoted 16 lines · Markus Niebel
From: Markus Niebel <[email protected]>
for multi instance API we use struct
fsl_esdhc_cfgto pass the clock rate. Do not setf_maxfrom global data, since this is wrong for multi instance case.Signed-off-by Markus Niebel <[email protected]>--- drivers/mmc/fsl_esdhc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/fsl_esdhc.c +0
-0
drivers/mmc/fsl_esdhc.c int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg) · line 616
Quoted 8 lines
drivers/mmc/fsl_esdhc.c +1
-1@@ -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 ;
This seems the right thing to do.
PATCH 1/1 mmc: fsl_esdhc: fix f_max retrieval during init
Quoted 25 lines · Eric Nelson
Hi Markus,
Quoted 22 lines · Markus Niebel
From: Markus Niebel <[email protected]>
for multi instance API we use struct
fsl_esdhc_cfgto pass the clock rate. Do not setf_maxfrom global data, since this is wrong for multi instance case.Signed-off-by Markus Niebel <[email protected]>--- drivers/mmc/fsl_esdhc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/fsl_esdhc.c +1
-1@@ -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 );
Quoted 7 lines
drivers/mmc/fsl_esdhc.c int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg) · line 616
Quoted 2 lines
drivers/mmc/fsl_esdhc.c +0
-0cfg->cfg.b_max =CONFIG_SYS_MMC_MAX_BLK_COUNT ;This seems the right thing to do.
Tested-by Eric Nelson <[email protected]>
Applied to u-boot-mpc85xx master. Awaiting upstream. Thanks.
York