File tree Expand file tree Collapse file tree 6 files changed +16
-15
lines changed
include/zephyr/arch/common
samples/boards/nordic/spis_wakeup Expand file tree Collapse file tree 6 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ __noinit
2828#endif
2929_cpu_context_t _cpu_context ;
3030
31- #ifndef CONFIG_PM_S2RAM_CUSTOM_MARKING
31+ #ifndef CONFIG_HAS_PM_S2RAM_CUSTOM_MARKING
3232/**
3333 * S2RAM Marker
3434 */
@@ -50,4 +50,4 @@ bool pm_s2ram_mark_check_and_clear(void)
5050 return false;
5151}
5252
53- #endif /* CONFIG_PM_S2RAM_CUSTOM_MARKING */
53+ #endif /* CONFIG_HAS_PM_S2RAM_CUSTOM_MARKING */
Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ int arch_pm_s2ram_suspend(pm_s2ram_system_off_fn_t system_off);
6363 * Function is called when system state is stored to RAM, just before going to system
6464 * off.
6565 *
66- * Default implementation is setting a magic word in RAM. CONFIG_PM_S2RAM_CUSTOM_MARKING
67- * allows custom implementation .
66+ * Default implementation is setting a magic word in RAM used if
67+ * CONFIG_HAS_PM_S2RAM_CUSTOM_MARKING is not set .
6868 */
6969void pm_s2ram_mark_set (void );
7070
@@ -74,8 +74,8 @@ void pm_s2ram_mark_set(void);
7474 * Function is used to determine if resuming after suspend-to-RAM shall be performed
7575 * or standard boot code shall be executed.
7676 *
77- * Default implementation is checking a magic word in RAM. CONFIG_PM_S2RAM_CUSTOM_MARKING
78- * allows custom implementation .
77+ * Default implementation is checking a magic word in RAM used if
78+ * CONFIG_HAS_PM_S2RAM_CUSTOM_MARKING is not set .
7979 *
8080 * @retval true if marking is found which indicates resuming after suspend-to-RAM.
8181 * @retval false if marking is not found which indicates standard boot.
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ CONFIG_SPI_SLAVE=y
33CONFIG_GPIO=y
44
55CONFIG_PM=y
6- CONFIG_PM_S2RAM_CUSTOM_MARKING=y
76CONFIG_PM_DEVICE=y
87CONFIG_PM_DEVICE_RUNTIME=y
98
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ CONFIG_SPI_NRFX_WAKE_TIMEOUT_US=500
33CONFIG_GPIO=y
44
55CONFIG_PM=y
6- CONFIG_PM_S2RAM_CUSTOM_MARKING=y
76CONFIG_PM_DEVICE=y
87CONFIG_PM_DEVICE_RUNTIME=y
98
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ config SOC_NRF54H20_CPUAPP_COMMON
3535 select NRFS_HAS_TEMP_SERVICE
3636 select NRFS_HAS_VBUS_DETECTOR_SERVICE
3737 select HAS_PM
38+ select HAS_PM_S2RAM_CUSTOM_MARKING
3839 select HAS_POWEROFF
3940
4041config SOC_NRF54H20_CPUAPP
@@ -64,6 +65,7 @@ config SOC_NRF54H20_CPURAD_COMMON
6465 select HAS_NORDIC_DMM
6566 select HAS_NORDIC_RAM_CTRL
6667 select HAS_PM
68+ select HAS_PM_S2RAM_CUSTOM_MARKING
6769 select HAS_POWEROFF
6870
6971config SOC_NRF54H20_CPURAD_ENABLE
Original file line number Diff line number Diff line change @@ -10,6 +10,14 @@ config HAS_PM
1010 This option must be selected by SoCs that provide PM hooks, that is,
1111 calls to configure low-power states.
1212
13+ config HAS_PM_S2RAM_CUSTOM_MARKING
14+ bool
15+ depends on HAS_PM
16+ help
17+ By default a magic word in RAM is used to mark entering suspend-to-RAM. If this
18+ option is selected, a custom implementation of functions which handle the marking
19+ must be provided.
20+
1321config PM
1422 bool "System Power Management"
1523 depends on SYS_CLOCK_EXISTS && HAS_PM
@@ -45,13 +53,6 @@ config PM_S2RAM
4553 sleep states if PM is enabled and one or more suspend-to-ram sleep states are
4654 enabled in the devicetree.
4755
48- config PM_S2RAM_CUSTOM_MARKING
49- bool "Use custom marking functions"
50- depends on PM_S2RAM
51- help
52- By default a magic word in RAM is used to mark entering suspend-to-RAM. Enabling
53- this option allows custom implementation of functions which handle the marking.
54-
5556config PM_NEED_ALL_DEVICES_IDLE
5657 bool "System Low Power Mode Needs All Devices Idle"
5758 depends on PM_DEVICE && !SMP
You can’t perform that action at this time.
0 commit comments