Skip to content

Commit 1ee39b9

Browse files
jerome-pouillercfriedt
authored andcommitted
soc: silabs: siwx91x: Fix coding style
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 <jerome.pouiller@silabs.com>
1 parent c24936f commit 1ee39b9

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

modules/hal_silabs/wiseconnect/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ zephyr_include_directories(
4848
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/config
4949
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver
5050
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/cmsis_driver/CMSIS/Driver/Include
51+
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/ahb_interface/inc
5152
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/firmware_upgrade
5253
)
5354

@@ -165,7 +166,6 @@ if(CONFIG_WISECONNECT_NETWORK_STACK)
165166
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/sl_net/inc
166167
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/socket/inc
167168
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/asynchronous_socket/inc
168-
${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/ahb_interface/inc
169169
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/core/chip/config
170170
${WISECONNECT_DIR}/components/protocol/wifi/inc
171171
${WISECONNECT_DIR}/components/service/network_manager/inc

soc/silabs/silabs_siwx91x/siwg917/soc.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
#include <zephyr/sw_isr_table.h>
1111

1212
#include "em_device.h"
13-
#ifdef CONFIG_WISECONNECT_NETWORK_STACK
1413
#include "sli_siwx917_soc.h"
15-
#endif
1614
#include "sl_si91x_power_manager.h"
1715

1816
void soc_early_init_hook(void)
@@ -23,15 +21,16 @@ void soc_early_init_hook(void)
2321
.m4ss_ram_size_kb = (DT_REG_SIZE(DT_NODELABEL(sram0)) / 1024),
2422
.ulpss_ram_size_kb = 4,
2523
};
24+
2625
SystemInit();
27-
#if IS_ENABLED(CONFIG_SOC_SIWX91X_PM_BACKEND_PMGR)
28-
sli_si91x_platform_init();
29-
sl_si91x_power_manager_init();
30-
sl_si91x_power_manager_remove_peripheral_requirement(&peripheral_config);
31-
sl_si91x_power_manager_configure_ram_retention(&ram_configuration);
32-
sl_si91x_power_manager_add_ps_requirement(SL_SI91X_POWER_MANAGER_PS4);
33-
sl_si91x_power_manager_set_clock_scaling(SL_SI91X_POWER_MANAGER_PERFORMANCE);
34-
#endif
26+
if (IS_ENABLED(CONFIG_SOC_SIWX91X_PM_BACKEND_PMGR)) {
27+
sli_si91x_platform_init();
28+
sl_si91x_power_manager_init();
29+
sl_si91x_power_manager_remove_peripheral_requirement(&peripheral_config);
30+
sl_si91x_power_manager_configure_ram_retention(&ram_configuration);
31+
sl_si91x_power_manager_add_ps_requirement(SL_SI91X_POWER_MANAGER_PS4);
32+
sl_si91x_power_manager_set_clock_scaling(SL_SI91X_POWER_MANAGER_PERFORMANCE);
33+
}
3534
}
3635

3736
/* SiWx917's bootloader requires IRQn 32 to hold payload's entry point address. */

0 commit comments

Comments
 (0)