soc: arm: move init code from SYS_INIT to hooks

Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2024-09-10 09:42:28 -04:00 committed by Henrik Brix Andersen
commit 3af24f88ce
2 changed files with 2 additions and 11 deletions

View file

@ -8,3 +8,4 @@ config SOC_SERIES_BEETLE
select CPU_CORTEX_M3
select CPU_HAS_ARM_MPU
select CPU_CORTEX_M_HAS_DWT
select SOC_EARLY_INIT_HOOK

View file

@ -21,19 +21,9 @@
* @brief Perform basic hardware initialization at boot.
*
* This needs to be run from the very beginning.
* So the init priority has to be 0 (zero).
*
* Assumption:
* MAINCLK = 24Mhz
*
* @return 0
*/
static int arm_beetle_init(void)
void soc_early_init_hook(void)
{
/* Setup various clocks and wakeup sources */
soc_power_init();
return 0;
}
SYS_INIT(arm_beetle_init, PRE_KERNEL_1, 0);