summaryrefslogtreecommitdiff
path: root/boot/Kconfig
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-12-14 21:36:40 +0300
committerTom Rini <trini@konsulko.com>2021-12-28 00:20:18 +0300
commit2f8a6db5d83b103e372172422a3d0aff873f1299 (patch)
tree419f0a496c644b438c2702b23f86686eb0758f85 /boot/Kconfig
parente4c3ce7e2845d75dc1696b2875bb632993a9c51c (diff)
downloadu-boot-2f8a6db5d83b103e372172422a3d0aff873f1299.tar.xz
Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig
In order to finish moving this symbol to Kconfig for all platforms, we need to do a few more things. First, for all platforms that define this to a function, introduce CONFIG_DYNAMIC_SYS_CLK_FREQ, similar to CONFIG_DYNAMIC_DDR_CLK_FREQ and populate clock_legacy.h. This entails also switching all users from CONFIG_SYS_CLK_FREQ to get_board_sys_clk() and updating a few preprocessor tests. With that done, all platforms that define a value here can be converted to Kconfig, and a fall-back of zero is sufficiently safe to use (and what is used today in cases where code may or may not have this available). Make sure that code which calls this function includes <clock_legacy.h> to get the prototype. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'boot/Kconfig')
-rw-r--r--boot/Kconfig20
1 files changed, 18 insertions, 2 deletions
diff --git a/boot/Kconfig b/boot/Kconfig
index e58157589f..f1ce576ab2 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -358,11 +358,27 @@ config SYS_TEXT_BASE
help
The address in memory that U-Boot will be running from, initially.
+config DYNAMIC_SYS_CLK_FREQ
+ bool "Determine CPU clock frequency at run-time"
+ help
+ Implement a get_board_sys_clk function that will determine the CPU
+ clock frequency at run time, rather than define it statically.
+
config SYS_CLK_FREQ
- depends on ARC || ARCH_SUNXI || MPC83xx
+ depends on !DYNAMIC_SYS_CLK_FREQ
int "CPU clock frequency"
+ default 125000000 if ARCH_LS1012A
+ default 100000000 if ARCH_P2020 || ARCH_T1024 || ARCH_T1042 || \
+ ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
+ default 66666666 if ARCH_P1010 || ARCH_P1020 || ARCH_T4240
+ default 66660000 if ARCH_T2080
+ default 33333333 if RCAR_GEN3
+ default 24000000 if ARCH_EXYNOS
+ default 20000000 if RCAR_GEN2
+ default 0
help
- TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
+ A static value for the CPU frequency. Note that if not required
+ for a given SoC, this can be left at 0.
config ARCH_FIXUP_FDT_MEMORY
bool "Enable arch_fixup_memory_banks() call"