From 759e07bebe208f4cc1036a7525a80551e16a465c Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Wed, 20 Sep 2023 01:32:18 +0000 Subject: [PATCH] intel_adsp: move memory window setup to PRE_KERNEL_1 PRE_KERNEL_1 is more suited for dealing with devices, so move out of EARLY. Verified on hardware and things seem to behave the same. Something was changed since this was first introduced as this was not possible for some reason. Fixes #62627 Signed-off-by: Anas Nashif --- drivers/console/winstream_console.c | 2 +- soc/xtensa/intel_adsp/common/mem_window.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/console/winstream_console.c b/drivers/console/winstream_console.c index 8d574bbe3a2..abc5344593a 100644 --- a/drivers/console/winstream_console.c +++ b/drivers/console/winstream_console.c @@ -62,4 +62,4 @@ static int winstream_console_init(void) return 0; } -SYS_INIT(winstream_console_init, EARLY, CONFIG_CONSOLE_INIT_PRIORITY); +SYS_INIT(winstream_console_init, PRE_KERNEL_1, CONFIG_CONSOLE_INIT_PRIORITY); diff --git a/soc/xtensa/intel_adsp/common/mem_window.c b/soc/xtensa/intel_adsp/common/mem_window.c index e101d03ec16..8ca591deb36 100644 --- a/soc/xtensa/intel_adsp/common/mem_window.c +++ b/soc/xtensa/intel_adsp/common/mem_window.c @@ -54,8 +54,9 @@ void mem_window_idle_exit(void) .mem_base = DT_REG_ADDR(DT_PHANDLE(MEM_WINDOW_NODE(n), memory)) + WIN_OFFSET(n), \ .initialize = DT_PROP(MEM_WINDOW_NODE(n), initialize), \ }; \ - DEVICE_DT_DEFINE(MEM_WINDOW_NODE(n), mem_win_init, NULL, NULL, &mem_win_config_##n, EARLY, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL); + DEVICE_DT_DEFINE(MEM_WINDOW_NODE(n), mem_win_init, NULL, NULL, \ + &mem_win_config_##n, PRE_KERNEL_1, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL); #if DT_NODE_HAS_STATUS(MEM_WINDOW_NODE(0), okay) MEM_WINDOW_DEFINE(0)