1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <soc/wakeup.h>
8 if (wakeup_need_reset())
11 power_init(); /* Ensure ps_hold_setup() for early wakeup. */
13 /* Should never return. If we do, reset. */
17 int get_wakeup_state(void)
19 uint32_t status
= power_read_reset_status();
21 /* DIDLE/LPA can be resumed without clock reset (ex, bootblock),
22 * and SLEEP requires resetting clock (should be done in ROM stage).
25 if (status
== S5P_CHECK_DIDLE
|| status
== S5P_CHECK_LPA
)
28 if (status
== S5P_CHECK_SLEEP
)
29 return WAKEUP_NEED_CLOCK_RESET
;
34 void wakeup_enable_uart(void)
36 power_release_uart_retention();