1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* Power setup code for EXYNOS5 */
5 #include <device/mmio.h>
11 /* Set the PS-Hold drive value */
12 static void ps_hold_setup(void)
14 /* Set PS-Hold high */
15 setbits32(&exynos_power
->ps_hold_ctrl
,
16 POWER_PS_HOLD_CONTROL_DATA_HIGH
);
19 void power_reset(void)
21 /* Clear inform1 so there's no change we think we've got a wake reset */
22 exynos_power
->inform1
= 0;
24 setbits32(&exynos_power
->sw_reset
, 1);
27 /* This function never returns */
28 void power_shutdown(void)
30 clrbits32(&exynos_power
->ps_hold_ctrl
,
31 POWER_PS_HOLD_CONTROL_DATA_HIGH
);
36 void power_enable_dp_phy(void)
38 setbits32(&exynos_power
->dptx_phy_control
, EXYNOS_DP_PHY_ENABLE
);
41 void power_enable_hw_thermal_trip(void)
43 /* Enable HW thermal trip */
44 setbits32(&exynos_power
->ps_hold_ctrl
, POWER_ENABLE_HW_TRIP
);
47 uint32_t power_read_reset_status(void)
49 return exynos_power
->inform1
;
52 void power_exit_wakeup(void)
54 typedef void (*resume_func
)(void);
56 ((resume_func
)exynos_power
->inform0
)();
65 void power_enable_xclkout(void)
67 /* use xxti for xclk out */
68 clrsetbits32(&exynos_power
->pmu_debug
, PMU_DEBUG_CLKOUT_SEL_MASK
,
72 void power_release_uart_retention(void)
74 write32(&exynos_power
->padret_uart_opt
, 1 << 28);