u32 div;
};
-int clock_init(void);
+int clock_init_early(void);
+int clock_init_late(void);
u32 get_clk_src_rate(enum ccm_clk_src source);
u32 get_lpuart_clk(void);
void init_uart_clk(u32 index);
}
}
-int clock_init(void)
+int clock_init_early(void)
{
int i;
- if (is_voltage_mode(VOLT_LOW_DRIVE)) {
- bus_clock_init_low_drive();
- set_arm_clk(MHZ(900));
- } else {
- bus_clock_init();
- }
-
/* allow for non-secure access */
for (i = 0; i < OSCPLL_END; i++)
ccm_clk_src_tz_access(i, true, false, false);
return 0;
}
+/* Set bus and A55 core clock per voltage mode */
+int clock_init_late(void)
+{
+ if (is_voltage_mode(VOLT_LOW_DRIVE)) {
+ bus_clock_init_low_drive();
+ set_arm_core_max_clk();
+ } else {
+ bus_clock_init();
+ }
+
+ return 0;
+}
+
int set_clk_eqos(enum enet_freq type)
{
u32 eqos_post_div;
debug("LC: 0x%x\n", gd->arch.lifecycle);
}
+ clock_init_late();
+
power_init_board();
- if (!IS_ENABLED(CONFIG_IMX9_LOW_DRIVE_MODE))
+ if (!is_voltage_mode(VOLT_LOW_DRIVE))
set_arm_clk(get_cpu_speed_grade_hz());
/* Init power of mix */