diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2020-02-25 02:58:34 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2020-03-11 15:24:15 +0100 |
commit | 2243af41115d0e36e6414df6dd2a0386e022d9f8 (patch) | |
tree | 9e74de6823d95c4af98286389980cc4af0f0810e /drivers/memory | |
parent | bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9 (diff) | |
download | linux-2243af41115d0e36e6414df6dd2a0386e022d9f8.tar.gz linux-2243af41115d0e36e6414df6dd2a0386e022d9f8.tar.bz2 linux-2243af41115d0e36e6414df6dd2a0386e022d9f8.zip |
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: 8209eefa3d37 ("memory: tegra: Implement EMC debugfs interface on Tegra20")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/tegra/tegra20-emc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c index 8ae474d9bfb9..b16715e9515d 100644 --- a/drivers/memory/tegra/tegra20-emc.c +++ b/drivers/memory/tegra/tegra20-emc.c @@ -628,6 +628,11 @@ static void tegra_emc_debugfs_init(struct tegra_emc *emc) 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, emc->debugfs.max_rate); if (err < 0) { |