@@ -38,25 +38,6 @@ void soc_early_init_hook(void)
38
38
39
39
/* Internal timer15 for SPOT manager */
40
40
IRQ_CONNECT (82 , 0 , hal_internal_timer_isr , 0 , 0 );
41
-
42
- /* Initialize for low power in the power control block */
43
- am_hal_pwrctrl_low_power_init ();
44
-
45
- /* Enable SIMOBUCK for the apollo5 Family */
46
- am_hal_pwrctrl_control (AM_HAL_PWRCTRL_CONTROL_SIMOBUCK_INIT , NULL );
47
-
48
- /*
49
- * Set default temperature for spotmgr to room temperature
50
- */
51
- am_hal_pwrctrl_temp_thresh_t dummy ;
52
-
53
- am_hal_pwrctrl_temp_update (25.0f , & dummy );
54
-
55
- /* Enable Icache*/
56
- sys_cache_instr_enable ();
57
-
58
- /* Enable Dcache */
59
- sys_cache_data_enable ();
60
41
}
61
42
62
43
#if CONFIG_CACHE_MANAGEMENT
@@ -84,3 +65,29 @@ bool buf_in_nocache(uintptr_t buf, size_t len_bytes)
84
65
return buf_within_nocache ;
85
66
}
86
67
#endif
68
+
69
+ int apollo5x_init (void )
70
+ {
71
+ /* Initialize for low power in the power control block */
72
+ am_hal_pwrctrl_low_power_init ();
73
+
74
+ /* Enable SIMOBUCK for the apollo5 Family */
75
+ am_hal_pwrctrl_control (AM_HAL_PWRCTRL_CONTROL_SIMOBUCK_INIT , NULL );
76
+
77
+ /*
78
+ * Set default temperature for spotmgr to room temperature
79
+ */
80
+ am_hal_pwrctrl_temp_thresh_t dummy ;
81
+
82
+ am_hal_pwrctrl_temp_update (25.0f , & dummy );
83
+
84
+ /* Enable Icache*/
85
+ sys_cache_instr_enable ();
86
+
87
+ /* Enable Dcache */
88
+ sys_cache_data_enable ();
89
+
90
+ return 0 ;
91
+ }
92
+
93
+ SYS_INIT (apollo5x_init , PRE_KERNEL_1 , 0 );
0 commit comments