summaryrefslogtreecommitdiff
path: root/chip/npcx/system-npcx7.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/npcx/system-npcx7.c')
-rw-r--r--chip/npcx/system-npcx7.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/chip/npcx/system-npcx7.c b/chip/npcx/system-npcx7.c
index c476945e42..4651e425e1 100644
--- a/chip/npcx/system-npcx7.c
+++ b/chip/npcx/system-npcx7.c
@@ -32,8 +32,7 @@ void system_mpu_config(void)
#error "Do not enable CONFIG_HIBERNATE_PSL if npcx ec doesn't support PSL mode!"
#endif
-/* Hibernate function implemented by PSL (Power Switch Logic) mode. */
-void __keep __attribute__ ((noreturn)) __enter_hibernate_in_psl(void)
+void system_enter_psl_mode(void)
{
/* Configure pins from GPIOs to PSL which rely on VSBY power rail. */
gpio_config_module(MODULE_PMU, 1);
@@ -49,7 +48,12 @@ void __keep __attribute__ ((noreturn)) __enter_hibernate_in_psl(void)
* setting bit 5 of PDOUT(8).
*/
SET_BIT(NPCX_PDOUT(GPIO_PORT_8), 5);
+}
+/* Hibernate function implemented by PSL (Power Switch Logic) mode. */
+void __keep __attribute__ ((noreturn)) __enter_hibernate_in_psl(void)
+{
+ system_enter_psl_mode();
/* Spin and wait for PSL cuts power; should never return */
while (1)
;