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:
parent
e9474302da
commit
b60efecdf6
2 changed files with 2 additions and 8 deletions
|
@ -10,6 +10,7 @@ config SOC_FAMILY_MAX32
|
||||||
select CPU_CORTEX_M_HAS_SYSTICK
|
select CPU_CORTEX_M_HAS_SYSTICK
|
||||||
select CLOCK_CONTROL
|
select CLOCK_CONTROL
|
||||||
select BUILD_OUTPUT_HEX
|
select BUILD_OUTPUT_HEX
|
||||||
|
select SOC_EARLY_INIT_HOOK
|
||||||
|
|
||||||
config SOC_MAX32655
|
config SOC_MAX32655
|
||||||
select CPU_CORTEX_M4
|
select CPU_CORTEX_M4
|
||||||
|
|
|
@ -26,16 +26,9 @@ bool z_arm_on_enter_cpu_idle(void)
|
||||||
* @brief Perform basic hardware initialization at boot.
|
* @brief Perform basic hardware initialization at boot.
|
||||||
*
|
*
|
||||||
* This needs to be run from the very beginning.
|
* 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 */
|
/* Apply device related preinit configuration */
|
||||||
max32xx_system_init();
|
max32xx_system_init();
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SYS_INIT(max32xxx_init, PRE_KERNEL_1, 0);
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue