Skip to content

Commit

Permalink
soc: telink: move init code from SYS_INIT to hooks
Browse files Browse the repository at this point in the history
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information
nashif authored and henrikbrixandersen committed Sep 20, 2024
1 parent c6a0360 commit 6624ebd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions soc/telink/tlsr/tlsr951x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ config SOC_SERIES_TLSR951X
select CPU_HAS_FPU
select INCLUDE_RESET_VECTOR
imply XIP
select SOC_EARLY_INIT_HOOK

if SOC_SERIES_TLSR951X

Expand Down
6 changes: 1 addition & 5 deletions soc/telink/tlsr/tlsr951x/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
*
* @return 0
*/
static int soc_b91_init(void)
void soc_early_init_hook(void)
{
unsigned int cclk = DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency);

Expand Down Expand Up @@ -109,8 +109,6 @@ static int soc_b91_init(void)
/* Init Machine Timer source clock: 32 KHz RC */
clock_32k_init(CLK_32K_RC);
clock_cal_32k_rc();

return 0;
}

/**
Expand All @@ -122,5 +120,3 @@ void sys_arch_reboot(int type)

reg_reset = SOFT_RESET;
}

SYS_INIT(soc_b91_init, PRE_KERNEL_1, 0);

0 comments on commit 6624ebd

Please sign in to comment.