mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
mmc: fsl_esdhc: fix mmc->clock with actual clock
Fix mmc->clock with actual clock which is divided by the controller, and record it with priv->clock which was removed accidentally. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
This commit is contained in:
parent
db8f93672b
commit
30f6444d02
1 changed files with 3 additions and 0 deletions
|
@ -523,6 +523,9 @@ static void set_sysctl(struct fsl_esdhc_priv *priv, struct mmc *mmc, uint clock)
|
|||
while (sdhc_clk / (div * pre_div) > clock && div < 16)
|
||||
div++;
|
||||
|
||||
mmc->clock = sdhc_clk / pre_div / div;
|
||||
priv->clock = mmc->clock;
|
||||
|
||||
pre_div >>= 1;
|
||||
div -= 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue