Commit 2243af41 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Thierry Reding

memory: tegra: Correct debugfs clk rate-range on Tegra20

Correctly set clk rate-range if number of available timings is zero.
This fixes noisy "invalid range [4294967295, 0]" error messages during
boot.

Fixes: 8209eefa ("memory: tegra: Implement EMC debugfs interface on Tegra20")
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent bb6d3fb3
...@@ -628,6 +628,11 @@ static void tegra_emc_debugfs_init(struct tegra_emc *emc) ...@@ -628,6 +628,11 @@ static void tegra_emc_debugfs_init(struct tegra_emc *emc)
emc->debugfs.max_rate = emc->timings[i].rate; emc->debugfs.max_rate = emc->timings[i].rate;
} }
if (!emc->num_timings) {
emc->debugfs.min_rate = clk_get_rate(emc->clk);
emc->debugfs.max_rate = emc->debugfs.min_rate;
}
err = clk_set_rate_range(emc->clk, emc->debugfs.min_rate, err = clk_set_rate_range(emc->clk, emc->debugfs.min_rate,
emc->debugfs.max_rate); emc->debugfs.max_rate);
if (err < 0) { if (err < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment