soc: brcm: 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
51c771ecb2
commit
5c541ffd30
|
@ -6,8 +6,10 @@ config SOC_BCM58402_M7
|
|||
select CPU_CORTEX_M7
|
||||
select CPU_CORTEX_M_HAS_SYSTICK
|
||||
select CPU_HAS_ARM_MPU
|
||||
select SOC_EARLY_INIT_HOOK
|
||||
|
||||
config SOC_BCM58402_A72
|
||||
select ARM64
|
||||
select CPU_CORTEX_A72
|
||||
select ARM_ARCH_TIMER if SYS_CLOCK_EXISTS
|
||||
select SOC_EARLY_INIT_HOOK
|
||||
|
|
|
@ -13,11 +13,8 @@
|
|||
* @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 viper_init(void)
|
||||
void soc_early_init_hook(void)
|
||||
{
|
||||
uint32_t key;
|
||||
uint32_t data;
|
||||
|
@ -35,8 +32,4 @@ static int viper_init(void)
|
|||
sys_write32(data, LS_ICFG_PMON_LITE_SW_RESETN);
|
||||
|
||||
irq_unlock(key);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(viper_init, PRE_KERNEL_1, 0);
|
||||
|
|
|
@ -13,11 +13,8 @@
|
|||
* @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 viper_init(void)
|
||||
void soc_early_init_hook(void)
|
||||
{
|
||||
uint32_t data;
|
||||
|
||||
|
@ -29,8 +26,4 @@ static int viper_init(void)
|
|||
data = sys_read32(LS_ICFG_PMON_LITE_SW_RESETN);
|
||||
data |= PCIE_PMON_LITE_SW_RESETN;
|
||||
sys_write32(data, LS_ICFG_PMON_LITE_SW_RESETN);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(viper_init, PRE_KERNEL_1, 0);
|
||||
|
|
Loading…
Reference in New Issue