Skip to content

Commit 810f978

Browse files
committed
Revert parts of "soc: intel: move init code from SYS_INIT to hooks"
This reverts parts of commit c344771 related to intel_adsp soc. There is a dependency on device initialization that was missed. Reverting until we have a proper way for migrating to hooks. Fixes #78880 Signed-off-by: Anas Nashif <[email protected]>
1 parent 43cc36f commit 810f978

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

soc/intel/intel_adsp/ace/Kconfig

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ config SOC_SERIES_INTEL_ADSP_ACE
1515
select XTENSA_CPU_HAS_HIFI3
1616
select XTENSA_CPU_HAS_HIFI4
1717
select ARCH_HAS_RESERVED_PAGE_FRAMES if MMU
18-
select SOC_LATE_INIT_HOOK
19-
select SOC_EARLY_INIT_HOOK
2018

2119
config SOC_INTEL_COMM_WIDGET
2220
bool "Intel Communication Widget driver"

soc/intel/intel_adsp/ace/multiprocessing.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ void soc_mp_init(void)
108108
soc_cpus_active[0] = true;
109109
}
110110

111-
void soc_late_init_hook(void)
111+
static int host_runtime_get(void)
112112
{
113-
pm_device_runtime_get(INTEL_ADSP_HST_DOMAIN_DEV);
113+
return pm_device_runtime_get(INTEL_ADSP_HST_DOMAIN_DEV);
114114
}
115-
115+
SYS_INIT(host_runtime_get, POST_KERNEL, 99);
116116

117117
#ifdef CONFIG_ADSP_IMR_CONTEXT_SAVE
118118
/*

soc/intel/intel_adsp/cavs/Kconfig

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ config SOC_SERIES_INTEL_ADSP_CAVS
1111
select ATOMIC_OPERATIONS_ARCH if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "xcc"
1212
select ARCH_HAS_COHERENCE
1313
select HAS_PM
14-
select SOC_EARLY_INIT_HOOK
1514

1615
config SOC_INTEL_CAVS_V25
1716
select XTENSA_WAITI_BUG

soc/intel/intel_adsp/common/boot_complete.c

+2
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ int boot_complete(void)
2828

2929
return 0;
3030
}
31+
32+
SYS_INIT(boot_complete, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);

soc/intel/intel_adsp/common/soc.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@
66
#include <zephyr/init.h>
77
#include <zephyr/linker/section_tags.h>
88

9-
extern int boot_complete(void);
109
extern void power_init(void);
1110
extern void adsp_clock_init(void);
1211

1312
#if CONFIG_MP_MAX_NUM_CPUS > 1
1413
extern void soc_mp_init(void);
1514
#endif
1615

17-
void soc_early_init_hook(void)
16+
static __imr int soc_init(void)
1817
{
19-
(void)boot_complete();
2018
power_init();
2119

2220
#ifdef CONFIG_ADSP_CLOCK
@@ -26,4 +24,8 @@ void soc_early_init_hook(void)
2624
#if CONFIG_MP_MAX_NUM_CPUS > 1
2725
soc_mp_init();
2826
#endif
27+
28+
return 0;
2929
}
30+
31+
SYS_INIT(soc_init, PRE_KERNEL_1, 99);

0 commit comments

Comments
 (0)