2023-01-12 16:28:48 +00:00
|
|
|
From 4061bf81c366ccb309e2e597c5012ca246809b3a Mon Sep 17 00:00:00 2001
|
2021-03-29 22:07:22 +00:00
|
|
|
From: Bobby The Builder <bob@najdan.com>
|
2023-01-12 16:28:48 +00:00
|
|
|
Date: Thu, 12 Jan 2023 10:23:39 -0500
|
|
|
|
Subject: [PATCH] common: expose DRAM clock speed
|
2021-03-29 22:07:22 +00:00
|
|
|
|
|
|
|
---
|
2023-01-12 16:28:48 +00:00
|
|
|
common/board_f.c | 3 +++
|
|
|
|
common/main.c | 6 ++++++
|
|
|
|
2 files changed, 9 insertions(+)
|
2021-03-29 22:07:22 +00:00
|
|
|
|
|
|
|
diff --git a/common/board_f.c b/common/board_f.c
|
2023-01-12 16:28:48 +00:00
|
|
|
index e6117a7ba5..1fcfd3da86 100644
|
2021-03-29 22:07:22 +00:00
|
|
|
--- a/common/board_f.c
|
|
|
|
+++ b/common/board_f.c
|
2023-01-12 16:28:48 +00:00
|
|
|
@@ -251,6 +251,9 @@ static int show_dram_config(void)
|
|
|
|
debug("\nDRAM: ");
|
2021-03-29 22:07:22 +00:00
|
|
|
|
2023-01-12 16:28:48 +00:00
|
|
|
print_size(gd->ram_size, "");
|
2021-03-29 22:07:22 +00:00
|
|
|
+#if defined(CONFIG_DRAM_CLK)
|
2023-01-12 16:28:48 +00:00
|
|
|
+ printf(" @ %d MHz", CONFIG_DRAM_CLK);
|
2021-03-29 22:07:22 +00:00
|
|
|
+#endif
|
2023-01-12 16:28:48 +00:00
|
|
|
if (!sizes_near(gd->ram_size, size)) {
|
|
|
|
printf(" (effective ");
|
|
|
|
print_size(size, ")");
|
2021-03-29 22:07:22 +00:00
|
|
|
diff --git a/common/main.c b/common/main.c
|
2023-01-12 16:28:48 +00:00
|
|
|
index 682f3359ea..877df4c858 100644
|
2021-03-29 22:07:22 +00:00
|
|
|
--- a/common/main.c
|
|
|
|
+++ b/common/main.c
|
2023-01-12 16:28:48 +00:00
|
|
|
@@ -46,6 +46,12 @@ void main_loop(void)
|
2021-03-29 22:07:22 +00:00
|
|
|
if (IS_ENABLED(CONFIG_VERSION_VARIABLE))
|
|
|
|
env_set("ver", version_string); /* set version variable */
|
|
|
|
|
|
|
|
+#if defined(CONFIG_DRAM_CLK)
|
|
|
|
+ char ram_clk_string[11];
|
|
|
|
+ sprintf(ram_clk_string, "%d", CONFIG_DRAM_CLK);
|
2021-06-08 21:36:42 +00:00
|
|
|
+ env_set("ram_freq", ram_clk_string);
|
2021-03-29 22:07:22 +00:00
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
cli_init();
|
|
|
|
|
|
|
|
if (IS_ENABLED(CONFIG_USE_PREBOOT))
|
|
|
|
--
|
2023-01-12 16:28:48 +00:00
|
|
|
2.38.1
|
2021-03-29 22:07:22 +00:00
|
|
|
|