Skip to content

Commit

Permalink
Revert parts of "soc: intel: move init code from SYS_INIT to hooks"
Browse files Browse the repository at this point in the history
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 <anas.nashif@intel.com>
  • Loading branch information
nashif committed Sep 23, 2024
1 parent 43cc36f commit 810f978
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 0 additions & 2 deletions soc/intel/intel_adsp/ace/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ config SOC_SERIES_INTEL_ADSP_ACE
select XTENSA_CPU_HAS_HIFI3
select XTENSA_CPU_HAS_HIFI4
select ARCH_HAS_RESERVED_PAGE_FRAMES if MMU
select SOC_LATE_INIT_HOOK
select SOC_EARLY_INIT_HOOK

config SOC_INTEL_COMM_WIDGET
bool "Intel Communication Widget driver"
Expand Down
6 changes: 3 additions & 3 deletions soc/intel/intel_adsp/ace/multiprocessing.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ void soc_mp_init(void)
soc_cpus_active[0] = true;
}

void soc_late_init_hook(void)
static int host_runtime_get(void)
{
pm_device_runtime_get(INTEL_ADSP_HST_DOMAIN_DEV);
return pm_device_runtime_get(INTEL_ADSP_HST_DOMAIN_DEV);
}

SYS_INIT(host_runtime_get, POST_KERNEL, 99);

#ifdef CONFIG_ADSP_IMR_CONTEXT_SAVE
/*
Expand Down
1 change: 0 additions & 1 deletion soc/intel/intel_adsp/cavs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ config SOC_SERIES_INTEL_ADSP_CAVS
select ATOMIC_OPERATIONS_ARCH if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "xcc"
select ARCH_HAS_COHERENCE
select HAS_PM
select SOC_EARLY_INIT_HOOK

config SOC_INTEL_CAVS_V25
select XTENSA_WAITI_BUG
Expand Down
2 changes: 2 additions & 0 deletions soc/intel/intel_adsp/common/boot_complete.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ int boot_complete(void)

return 0;
}

SYS_INIT(boot_complete, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
8 changes: 5 additions & 3 deletions soc/intel/intel_adsp/common/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@
#include <zephyr/init.h>
#include <zephyr/linker/section_tags.h>

extern int boot_complete(void);
extern void power_init(void);
extern void adsp_clock_init(void);

#if CONFIG_MP_MAX_NUM_CPUS > 1
extern void soc_mp_init(void);
#endif

void soc_early_init_hook(void)
static __imr int soc_init(void)
{
(void)boot_complete();
power_init();

#ifdef CONFIG_ADSP_CLOCK
Expand All @@ -26,4 +24,8 @@ void soc_early_init_hook(void)
#if CONFIG_MP_MAX_NUM_CPUS > 1
soc_mp_init();
#endif

return 0;
}

SYS_INIT(soc_init, PRE_KERNEL_1, 99);

0 comments on commit 810f978

Please sign in to comment.