soc: ti: 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
6624ebd156
commit
b73c5578e3
10 changed files with 10 additions and 24 deletions
|
@ -17,6 +17,7 @@ config SOC_SERIES_AM6X_M4
|
|||
select EXTERNAL_ADDRESS_TRANSLATION
|
||||
select MM_DRV
|
||||
select MM_TI_RAT
|
||||
select SOC_PREP_HOOK
|
||||
|
||||
config SOC_PART_NUMBER
|
||||
default "AM6234" if SOC_AM6234_A53
|
||||
|
|
|
@ -62,12 +62,9 @@ static void am6x_mmr_unlock(void)
|
|||
sys_write32(KICK1_UNLOCK_VAL, kickAddr); /* KICK 1 */
|
||||
}
|
||||
|
||||
static int am6x_m4_init(void)
|
||||
void soc_prep_hook(void)
|
||||
{
|
||||
sys_mm_drv_ti_rat_init(am6x_region_config, ADDR_TRANSLATE_RAT_BASE_ADDR,
|
||||
ARRAY_SIZE(am6x_region_config));
|
||||
am6x_mmr_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(am6x_m4_init, EARLY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
|
|
|
@ -14,6 +14,7 @@ config SOC_SERIES_CC13X2_CC26X2
|
|||
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
|
||||
select HAS_PM
|
||||
select HAS_POWEROFF
|
||||
select SOC_EARLY_INIT_HOOK
|
||||
|
||||
menu "Customer Configuration (CCFG)"
|
||||
depends on SOC_SERIES_CC13X2_CC26X2
|
||||
|
|
|
@ -8,13 +8,9 @@
|
|||
|
||||
#include <driverlib/setup.h>
|
||||
|
||||
static int ti_cc13x2_cc26x2_init(void)
|
||||
void soc_early_init_hook(void)
|
||||
{
|
||||
|
||||
/* Performs necessary trim of the device. */
|
||||
SetupTrimDevice();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(ti_cc13x2_cc26x2_init, PRE_KERNEL_1, 0);
|
||||
|
|
|
@ -14,6 +14,7 @@ config SOC_SERIES_CC13X2X7_CC26X2X7
|
|||
select HAS_TI_CCFG if !BOOTLOADER_MCUBOOT
|
||||
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
|
||||
select HAS_PM
|
||||
select SOC_EARLY_INIT_HOOK
|
||||
|
||||
menu "Customer Configuration (CCFG)"
|
||||
depends on SOC_SERIES_CC13X2X7_CC26X2X7
|
||||
|
|
|
@ -8,13 +8,9 @@
|
|||
|
||||
#include <driverlib/setup.h>
|
||||
|
||||
static int ti_cc13x7_cc26x7_init(void)
|
||||
void soc_early_init_hook(void)
|
||||
{
|
||||
|
||||
/* Performs necessary trim of the device. */
|
||||
SetupTrimDevice();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(ti_cc13x7_cc26x7_init, PRE_KERNEL_1, 0);
|
||||
|
|
|
@ -7,6 +7,7 @@ config SOC_SERIES_CC32XX
|
|||
select CPU_CORTEX_M4
|
||||
select CPU_CORTEX_M_HAS_DWT
|
||||
select DYNAMIC_INTERRUPTS
|
||||
select SOC_EARLY_INIT_HOOK
|
||||
|
||||
config SOC_CC3220SF
|
||||
select HAS_CC3220SDK
|
||||
|
|
|
@ -18,7 +18,7 @@ void sys_arch_reboot(int type)
|
|||
MAP_PRCMMCUReset(!!type);
|
||||
}
|
||||
|
||||
static int ti_cc32xx_init(void)
|
||||
void soc_early_init_hook(void)
|
||||
{
|
||||
|
||||
/* Note: This function also performs CC3220 Initialization */
|
||||
|
@ -32,8 +32,4 @@ static int ti_cc32xx_init(void)
|
|||
MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK |
|
||||
PRCM_SLP_MODE_CLK);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(ti_cc32xx_init, PRE_KERNEL_1, 0);
|
||||
|
|
|
@ -9,6 +9,7 @@ config SOC_SERIES_MSP432P4XX
|
|||
select DYNAMIC_INTERRUPTS
|
||||
select CPU_HAS_FPU
|
||||
select CPU_HAS_ARM_MPU
|
||||
select SOC_EARLY_INIT_HOOK
|
||||
|
||||
config SOC_MSP432P401R
|
||||
select HAS_MSP432P4XXSDK
|
||||
|
|
|
@ -9,12 +9,8 @@
|
|||
#include <zephyr/init.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int ti_msp432p4xx_init(void)
|
||||
void soc_early_init_hook(void)
|
||||
{
|
||||
|
||||
SystemInit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(ti_msp432p4xx_init, PRE_KERNEL_1, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue