memory: tegra: Print a brief info message about EMC timings
authorDmitry Osipenko <digetx@gmail.com>
Sun, 11 Aug 2019 21:00:34 +0000 (00:00 +0300)
committerThierry Reding <treding@nvidia.com>
Mon, 11 Nov 2019 13:55:26 +0000 (14:55 +0100)
During boot print how many memory timings got the driver and what's the
RAM code. This is a very useful information when something is wrong with
boards memory timing.

Suggested-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/memory/tegra/tegra20-emc.c

index 85c24f2..25a6aad 100644 (file)
@@ -368,6 +368,13 @@ static int tegra_emc_load_timings_from_dt(struct tegra_emc *emc,
        sort(emc->timings, emc->num_timings, sizeof(*timing), cmp_timings,
             NULL);
 
+       dev_info(emc->dev,
+                "got %u timings for RAM code %u (min %luMHz max %luMHz)\n",
+                emc->num_timings,
+                tegra_read_ram_code(),
+                emc->timings[0].rate / 1000000,
+                emc->timings[emc->num_timings - 1].rate / 1000000);
+
        return 0;
 }