soc: adi: 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:25 -04:00 committed by Henrik Brix Andersen
commit b60efecdf6
2 changed files with 2 additions and 8 deletions

View file

@ -10,6 +10,7 @@ config SOC_FAMILY_MAX32
select CPU_CORTEX_M_HAS_SYSTICK
select CLOCK_CONTROL
select BUILD_OUTPUT_HEX
select SOC_EARLY_INIT_HOOK
config SOC_MAX32655
select CPU_CORTEX_M4

View file

@ -26,16 +26,9 @@ bool z_arm_on_enter_cpu_idle(void)
* @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).
*
* @return 0
*/
static int max32xxx_init(void)
void soc_early_init_hook(void)
{
/* Apply device related preinit configuration */
max32xx_system_init();
return 0;
}
SYS_INIT(max32xxx_init, PRE_KERNEL_1, 0);