From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Tue, 25 Nov 2014 09:47:42 -0800 Subject: [U-Boot] [Patch] mmc: fsl_esdhc: fix f_max retrieval during init In-Reply-To: <544ED31A.8010609@boundarydevices.com> References: <1414143893-18202-1-git-send-email-list-09_u-boot@tqsc.de> <544ED31A.8010609@boundarydevices.com> Message-ID: <5474C0BE.5040008@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/27/2014 04:19 PM, Eric Nelson wrote: > Hi Markus, > > On 10/24/2014 02:44 AM, Markus Niebel wrote: >> From: Markus Niebel >> >> 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 >> --- >> 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; >> > > This seems the right thing to do. > > Tested-by: Eric Nelson > Applied to u-boot-mpc85xx master. Awaiting upstream. Thanks. York