diff options
author | Peter Geis <pgwipeout@gmail.com> | 2023-12-19 15:35:52 +0200 |
---|---|---|
committer | Svyatoslav Ryhel <clamor95@gmail.com> | 2023-12-19 21:24:12 +0200 |
commit | 34aeb386af0edb449a6a3c34c41aeb00a85a3d2c (patch) | |
tree | 69a816aa545947774d478f04c31bc830711537f3 | |
parent | 944ac34075fe1dd1a16f0dee0d7279c8d49a537a (diff) | |
download | u-boot-34aeb386af0edb449a6a3c34c41aeb00a85a3d2c.zip u-boot-34aeb386af0edb449a6a3c34c41aeb00a85a3d2c.tar.gz u-boot-34aeb386af0edb449a6a3c34c41aeb00a85a3d2c.tar.bz2 |
mmc: tegra: use max-frequency from device tree if provided
The driver currently hard-codes the max freqency for the sdhci
controllers. If the controller is unable to operate at the max
frequency, the mmc card will not be available on the first scan.
Subsequent scans will eventually find a working combination.
Fix this by allowing the driver to check for the max-frequency
property and default to the original value if it doesn't exist.
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
-rw-r--r-- | drivers/mmc/tegra_mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c index d507adb..c01fb3d 100644 --- a/drivers/mmc/tegra_mmc.c +++ b/drivers/mmc/tegra_mmc.c @@ -698,7 +698,7 @@ static int tegra_mmc_probe(struct udevice *dev) * (actually 52MHz) */ cfg->f_min = 375000; - cfg->f_max = 48000000; + cfg->f_max = dev_read_u32_default(dev, "max-frequency", 48000000); cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT; |