* [U-Boot] [Patch] mmc: fsl_esdhc: fix f_max retrieval during init
@ 2014-10-24 9:44 Markus Niebel
2014-10-24 11:35 ` Stefano Babic
2014-10-27 23:19 ` Eric Nelson
0 siblings, 2 replies; 4+ messages in thread
From: Markus Niebel @ 2014-10-24 9:44 UTC (permalink / raw)
To: u-boot
From: Markus Niebel <Markus.Niebel@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@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [Patch] mmc: fsl_esdhc: fix f_max retrieval during init
2014-10-24 9:44 [U-Boot] [Patch] mmc: fsl_esdhc: fix f_max retrieval during init Markus Niebel
@ 2014-10-24 11:35 ` Stefano Babic
2014-10-27 23:19 ` Eric Nelson
1 sibling, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2014-10-24 11:35 UTC (permalink / raw)
To: u-boot
Hi Markus,
On 24/10/2014 11:44, Markus Niebel wrote:
> From: Markus Niebel <Markus.Niebel@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@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;
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.
Acked-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [Patch] mmc: fsl_esdhc: fix f_max retrieval during init
2014-10-24 9:44 [U-Boot] [Patch] mmc: fsl_esdhc: fix f_max retrieval during init Markus Niebel
2014-10-24 11:35 ` Stefano Babic
@ 2014-10-27 23:19 ` Eric Nelson
2014-11-25 17:47 ` York Sun
1 sibling, 1 reply; 4+ messages in thread
From: Eric Nelson @ 2014-10-27 23:19 UTC (permalink / raw)
To: u-boot
Hi Markus,
On 10/24/2014 02:44 AM, Markus Niebel wrote:
> From: Markus Niebel <Markus.Niebel@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@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;
>
This seems the right thing to do.
Tested-by: Eric Nelson <eric.nelson@boundarydevices.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [Patch] mmc: fsl_esdhc: fix f_max retrieval during init
2014-10-27 23:19 ` Eric Nelson
@ 2014-11-25 17:47 ` York Sun
0 siblings, 0 replies; 4+ messages in thread
From: York Sun @ 2014-11-25 17:47 UTC (permalink / raw)
To: u-boot
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 <Markus.Niebel@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@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;
>>
>
> This seems the right thing to do.
>
> Tested-by: Eric Nelson <eric.nelson@boundarydevices.com>
>
Applied to u-boot-mpc85xx master. Awaiting upstream. Thanks.
York
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-25 17:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 9:44 [U-Boot] [Patch] mmc: fsl_esdhc: fix f_max retrieval during init Markus Niebel
2014-10-24 11:35 ` Stefano Babic
2014-10-27 23:19 ` Eric Nelson
2014-11-25 17:47 ` York Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox