mb/google/brya/var/orisa: Update Type C DisplayPort HPD Configuration
[coreboot2.git] / src / soc / samsung / exynos5420 / wakeup.c
blob6534b073e5a47c20bdf7cdad94c662445f1cb15d
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <arch/cache.h>
4 #include <soc/power.h>
5 #include <soc/wakeup.h>
7 void wakeup(void)
9 if (wakeup_need_reset())
10 power_reset();
12 power_init(); /* Ensure ps_hold_setup() for early wakeup. */
13 dcache_mmu_disable();
14 power_exit_wakeup();
15 /* Should never return. If we do, reset. */
16 power_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)
28 return WAKEUP_DIRECT;
30 if (status == S5P_CHECK_SLEEP)
31 return WAKEUP_NEED_CLOCK_RESET;
33 return IS_NOT_WAKEUP;
36 void wakeup_enable_uart(void)
38 power_release_uart_retention();