1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <arch/cache.h>
5 #include <soc/wakeup.h>
9 if (wakeup_need_reset())
12 power_init(); /* Ensure ps_hold_setup() for early wakeup. */
15 /* Should never return. If we do, reset. */
19 int get_wakeup_state(void)
21 uint32_t status
= power_read_reset_status();
23 /* DIDLE/LPA can be resumed without clock reset (ex, bootblock),
24 * and SLEEP requires resetting clock (should be done in ROM stage).
27 if (status
== S5P_CHECK_DIDLE
|| status
== S5P_CHECK_LPA
)
30 if (status
== S5P_CHECK_SLEEP
)
31 return WAKEUP_NEED_CLOCK_RESET
;
36 void wakeup_enable_uart(void)
38 power_release_uart_retention();