diff options
author | Yangbo Lu | 2020-09-01 16:58:06 +0800 |
---|---|---|
committer | Peng Fan | 2020-10-12 15:47:05 +0800 |
commit | 30f6444d024a74ee48aa6969c1531aecd3c59deb (patch) | |
tree | 20332f933b5b877dbac5ffd9fd2035879eee807f /drivers | |
parent | db8f93672b42411856b11cf294a6f9c25482179c (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index c53751d0bbb..ce87416f5d9 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -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; |