From 1ee39b982396d2c42d77b537ca2ae46721bcbc3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Tue, 1 Jul 2025 11:01:36 +0200 Subject: [PATCH] soc: silabs: siwx91x: Fix coding style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no reason to place sli_siwx917_soc.h under #ifdef. Then, we can get rid of the #if in the body of soc_early_init_hook(). Signed-off-by: Jérôme Pouiller --- modules/hal_silabs/wiseconnect/CMakeLists.txt | 2 +- soc/silabs/silabs_siwx91x/siwg917/soc.c | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/modules/hal_silabs/wiseconnect/CMakeLists.txt b/modules/hal_silabs/wiseconnect/CMakeLists.txt index 4439f77b120..d9a42795b4d 100644 --- a/modules/hal_silabs/wiseconnect/CMakeLists.txt +++ b/modules/hal_silabs/wiseconnect/CMakeLists.txt @@ -48,6 +48,7 @@ zephyr_include_directories( ${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config ${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver ${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/CMSIS/Driver/Include + ${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/ahb_interface/inc ${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/firmware_upgrade ) @@ -165,7 +166,6 @@ if(CONFIG_WISECONNECT_NETWORK_STACK) ${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/inc ${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/socket/inc ${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/asynchronous_socket/inc - ${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/ahb_interface/inc ${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/core/chip/config ${WISECONNECT_DIR}/components/protocol/wifi/inc ${WISECONNECT_DIR}/components/service/network_manager/inc diff --git a/soc/silabs/silabs_siwx91x/siwg917/soc.c b/soc/silabs/silabs_siwx91x/siwg917/soc.c index 83f07c9a2f4..f7c023e3064 100644 --- a/soc/silabs/silabs_siwx91x/siwg917/soc.c +++ b/soc/silabs/silabs_siwx91x/siwg917/soc.c @@ -10,9 +10,7 @@ #include #include "em_device.h" -#ifdef CONFIG_WISECONNECT_NETWORK_STACK #include "sli_siwx917_soc.h" -#endif #include "sl_si91x_power_manager.h" void soc_early_init_hook(void) @@ -23,15 +21,16 @@ void soc_early_init_hook(void) .m4ss_ram_size_kb = (DT_REG_SIZE(DT_NODELABEL(sram0)) / 1024), .ulpss_ram_size_kb = 4, }; + SystemInit(); -#if IS_ENABLED(CONFIG_SOC_SIWX91X_PM_BACKEND_PMGR) - sli_si91x_platform_init(); - sl_si91x_power_manager_init(); - sl_si91x_power_manager_remove_peripheral_requirement(&peripheral_config); - sl_si91x_power_manager_configure_ram_retention(&ram_configuration); - sl_si91x_power_manager_add_ps_requirement(SL_SI91X_POWER_MANAGER_PS4); - sl_si91x_power_manager_set_clock_scaling(SL_SI91X_POWER_MANAGER_PERFORMANCE); -#endif + if (IS_ENABLED(CONFIG_SOC_SIWX91X_PM_BACKEND_PMGR)) { + sli_si91x_platform_init(); + sl_si91x_power_manager_init(); + sl_si91x_power_manager_remove_peripheral_requirement(&peripheral_config); + sl_si91x_power_manager_configure_ram_retention(&ram_configuration); + sl_si91x_power_manager_add_ps_requirement(SL_SI91X_POWER_MANAGER_PS4); + sl_si91x_power_manager_set_clock_scaling(SL_SI91X_POWER_MANAGER_PERFORMANCE); + } } /* SiWx917's bootloader requires IRQn 32 to hold payload's entry point address. */