summaryrefslogtreecommitdiffstats
path: root/drivers/memory/tegra
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2020-02-25 02:58:36 +0300
committerThierry Reding <treding@nvidia.com>2020-03-11 15:24:16 +0100
commit141267bffd1dc19a76e4d50e3e4829f85a806875 (patch)
treedf881fa5fc6f3e6c5e5c4dab8cabe2946ee99434 /drivers/memory/tegra
parenta53670e1a734ba56fac84cf2b93b838bd4a6b835 (diff)
downloadlinux-141267bffd1dc19a76e4d50e3e4829f85a806875.tar.gz
linux-141267bffd1dc19a76e4d50e3e4829f85a806875.tar.bz2
linux-141267bffd1dc19a76e4d50e3e4829f85a806875.zip
memory: tegra: Correct debugfs clk rate-range on Tegra124
Correctly set clk rate-range if number of available timings is zero. This fixes noisy "invalid range [4294967295, 0]" error messages during boot. Fixes: 6b9acd935546 ("memory: tegra: Refashion EMC debugfs interface on Tegra124") Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/memory/tegra')
-rw-r--r--drivers/memory/tegra/tegra124-emc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c
index 21f05240682b..33b8216bac30 100644
--- a/drivers/memory/tegra/tegra124-emc.c
+++ b/drivers/memory/tegra/tegra124-emc.c
@@ -1158,6 +1158,11 @@ static void emc_debugfs_init(struct device *dev, 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) {