drivers/mipi: Add support for KD_KD110N11_51IE panel
[coreboot2.git] / src / soc / samsung / exynos5250 / wakeup.c
blob72d97f80f0c5b74af0cf0cadb75e8dc94da5cdee
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <soc/power.h>
4 #include <soc/wakeup.h>
6 void wakeup(void)
8 if (wakeup_need_reset())
9 power_reset();
11 power_init(); /* Ensure ps_hold_setup() for early wakeup. */
12 power_exit_wakeup();
13 /* Should never return. If we do, reset. */
14 power_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)
26 return WAKEUP_DIRECT;
28 if (status == S5P_CHECK_SLEEP)
29 return WAKEUP_NEED_CLOCK_RESET;
31 return IS_NOT_WAKEUP;
34 void wakeup_enable_uart(void)
36 power_release_uart_retention();