aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-k3
diff options
context:
space:
mode:
authorDave Gerlach <d-gerlach@ti.com>2021-06-11 11:45:23 +0300
committerLokesh Vutla <lokeshvutla@ti.com>2021-06-11 16:34:52 +0530
commit61305e00c704aa3c4ccf73598074ada4e55185fd (patch)
tree8bf240fb6cb64955343e955fd68bd20885915368 /arch/arm/mach-k3
parent925698daaca552729701935743791a9c737152ed (diff)
downloadu-boot-61305e00c704aa3c4ccf73598074ada4e55185fd.zip
u-boot-61305e00c704aa3c4ccf73598074ada4e55185fd.tar.gz
u-boot-61305e00c704aa3c4ccf73598074ada4e55185fd.tar.bz2
arm: mach-k3: j721e_init: Force early probe of clk-k3 driver
Force the clk-k3 driver to probe early during R5 SPL boot to ensure the default system clock configuration is completed. Many other drivers assume a default state of the clock tree and it is currently possible for them to probe before clk-k3 depending on the exact system configuration. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Reported-by: Keerthy <j-keerthy@ti.com> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
Diffstat (limited to 'arch/arm/mach-k3')
-rw-r--r--arch/arm/mach-k3/j721e_init.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index 76a04a9..e9e076c 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -180,6 +180,18 @@ void board_init_f(ulong dummy)
k3_sysfw_loader(is_rom_loaded_sysfw(&bootdata),
k3_mmc_stop_clock, k3_mmc_restart_clock);
+ /*
+ * Force probe of clk_k3 driver here to ensure basic default clock
+ * configuration is always done.
+ */
+ if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
+ ret = uclass_get_device_by_driver(UCLASS_CLK,
+ DM_DRIVER_GET(ti_clk),
+ &dev);
+ if (ret)
+ panic("Failed to initialize clk-k3!\n");
+ }
+
/* Prepare console output */
preloader_console_init();