|
@@ -4,6 +4,7 @@
|
|
|
*/
|
|
|
|
|
|
#include <common.h>
|
|
|
+#include <dm.h>
|
|
|
#include <init.h>
|
|
|
|
|
|
#ifdef CONFIG_SPL_BUILD
|
|
@@ -31,3 +32,25 @@ int board_early_init_f(void)
|
|
|
return 0;
|
|
|
}
|
|
|
#endif
|
|
|
+
|
|
|
+#ifndef CONFIG_SPL_BUILD
|
|
|
+int board_early_init_r(void)
|
|
|
+{
|
|
|
+ struct udevice *clk;
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * This init is done in SPL, but when chain-loading U-Boot SPL will
|
|
|
+ * have been skipped. Allow the clock driver to check if it needs
|
|
|
+ * setting up.
|
|
|
+ */
|
|
|
+ ret = uclass_get_device_by_driver(UCLASS_CLK,
|
|
|
+ DM_GET_DRIVER(clk_rk3399), &clk);
|
|
|
+ if (ret) {
|
|
|
+ debug("%s: CLK init failed: %d\n", __func__, ret);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+#endif
|