Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boot/zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ if(CONFIG_MCUBOOT_CLEANUP_ARM_CORE)
)
endif()

if(CONFIG_SOC_NRF54H20_PM_S2RAM_OVERRIDE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing nrf-squash! and the previous no-up commit

if(CONFIG_ARCH_PM_S2RAM_RESUME)
zephyr_library_sources(${BOOT_DIR}/zephyr/nrf54h20_custom_s2ram.c)
endif()

Expand Down
18 changes: 2 additions & 16 deletions boot/zephyr/nrf54h20_custom_s2ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ volatile struct mcuboot_resume_s mcuboot_resume;
COND_CODE_0(DT_FIXED_PARTITION_EXISTS(DT_NODELABEL(node_label)), (0), \
(DT_REG_ADDR(DT_GPARENT(DT_NODELABEL(node_label))))))


int soc_s2ram_suspend(pm_s2ram_system_off_fn_t system_off)
{
(void)(system_off);
return -1;
}

void pm_s2ram_mark_set(void)
{
/* empty */
}

struct arm_vector_table {
uint32_t msp;
uint32_t reset;
Expand All @@ -52,13 +40,13 @@ struct arm_vector_table {
*/
#define APP_EXE_START_OFFSET 0x800 /* nRF54H20 */

bool pm_s2ram_mark_check_and_clear(void)
void pm_s2ram_mark_check_and_mediate(void)
{
uint32_t reset_reason = nrf_resetinfo_resetreas_local_get(NRF_RESETINFO);

if (reset_reason != NRF_RESETINFO_RESETREAS_LOCAL_UNRETAINED_MASK) {
/* Normal boot */
return false;
return;
}

/* S2RAM resume expected, do doublecheck */
Expand Down Expand Up @@ -92,6 +80,4 @@ bool pm_s2ram_mark_check_and_clear(void)

resume_failed:
FIH_PANIC;

return true;
}
6 changes: 1 addition & 5 deletions boot/zephyr/socs/nrf54h20_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@
# after suspend to RAM (S2RAM) requested by the application.
# MCUboot does not support S2RAM itself, but serves as an immediate actor while waking up
# from suspension.
CONFIG_PM=y
CONFIG_PM_DEVICE=n
CONFIG_PM_S2RAM=y
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
CONFIG_SOC_NRF54H20_PM_S2RAM_OVERRIDE=y
CONFIG_ARCH_PM_S2RAM_RESUME=y