Commit e6506619 authored by Anas Nashif's avatar Anas Nashif Committed by Henrik Brix Andersen
Browse files

soc: gd: move init code from SYS_INIT to hooks



Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: default avatarAnas Nashif <anas.nashif@intel.com>
parent c9e0a4b8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10,3 +10,4 @@ config SOC_SERIES_GD32A50X
	select GD32_HAS_AF_PINMUX
	select GD32_HAS_IRC_40K
	select SOC_RESET_HOOK
	select SOC_EARLY_INIT_HOOK
+1 −5
Original line number Diff line number Diff line
@@ -19,11 +19,7 @@ void soc_reset_hook(void)
	}
}

static int gd32a50x_soc_init(void)
void soc_early_init_hook(void)
{
	SystemInit();

	return 0;
}

SYS_INIT(gd32a50x_soc_init, PRE_KERNEL_1, 0);
+1 −0
Original line number Diff line number Diff line
@@ -9,3 +9,4 @@ config SOC_SERIES_GD32E10X
	select CPU_CORTEX_M_HAS_VTOR
	select GD32_HAS_AFIO_PINMUX
	select GD32_HAS_IRC_40K
	select SOC_EARLY_INIT_HOOK
+1 −5
Original line number Diff line number Diff line
@@ -7,11 +7,7 @@
#include <zephyr/init.h>
#include <soc.h>

static int gd32e10x_soc_init(void)
void soc_early_init_hook(void)
{
	SystemInit();

	return 0;
}

SYS_INIT(gd32e10x_soc_init, PRE_KERNEL_1, 0);
+1 −0
Original line number Diff line number Diff line
@@ -9,3 +9,4 @@ config SOC_SERIES_GD32E50X
	select ARMV8_M_DSP
	select GD32_HAS_AFIO_PINMUX
	select GD32_HAS_IRC_40K
	select SOC_EARLY_INIT_HOOK
Loading