diff options
| author | Tanmay Kathpalia <[email protected]> | 2025-12-03 04:21:33 -0800 |
|---|---|---|
| committer | Peng Fan <[email protected]> | 2025-12-11 20:53:50 +0800 |
| commit | 1e40e419aeb25f8d9a3f6872b5dcd05a2ed2b06e (patch) | |
| tree | 1b9b856381c31624133fa94d10329989d398ca9b /drivers | |
| parent | aebb523a23818a8ee4199c9532b51e3d4020696f (diff) | |
mmc: sdhci-cadence: Use max-frequency property from device tree
When f_max parameter is 0 in sdhci_setup_cfg(), the function defaults
to using the maximum frequency from host controller capabilities register
instead of the max-frequency property parsed from device tree.
The max-frequency property from device tree is parsed by mmc_of_parse()
and stored in plat->cfg.f_max, but sdhci_setup_cfg() was being called
with f_max=0, causing it to ignore the device tree value and use the
host capabilities register value instead.
Fix this by passing plat->cfg.f_max to sdhci_setup_cfg() to ensure
the device tree specified maximum frequency is respected over the
hardware default.
Signed-off-by: Tanmay Kathpalia <[email protected]>
Reviewed-by: Balsundar Ponnusamy <[email protected]>
Reviewed-by: Peng Fan <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mmc/sdhci-cadence.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c index 6c9d24fe5f7..b92b3df3ed9 100644 --- a/drivers/mmc/sdhci-cadence.c +++ b/drivers/mmc/sdhci-cadence.c @@ -253,7 +253,7 @@ static int sdhci_cdns_probe(struct udevice *dev) host->mmc = &plat->mmc; host->mmc->dev = dev; - ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0); + ret = sdhci_setup_cfg(&plat->cfg, host, plat->cfg.f_max, 0); if (ret) return ret; |
