diff --git a/plat/mediatek/mt8195/plat_pm.c b/plat/mediatek/mt8195/plat_pm.c index 48ab6ae64e0a8468b6c125dbbc96fbda77472722..0bff30eb948e3222112ef25e8afbbb5d3a7f8c5e 100644 --- a/plat/mediatek/mt8195/plat_pm.c +++ b/plat/mediatek/mt8195/plat_pm.c @@ -9,6 +9,7 @@ #include #include +#include #include /* platform specific headers */ @@ -16,6 +17,7 @@ #include #include #include +#include #include /* @@ -332,7 +334,24 @@ static void plat_get_sys_suspend_power_state(psci_power_state_t *req_state) sizeof(plat_power_state[cpu])); } +/******************************************************************************* + * MTK handlers to shutdown/reboot the system + ******************************************************************************/ +static void __dead2 plat_mtk_system_reset(void) +{ + struct bl_aux_gpio_info *gpio_reset = plat_get_mtk_gpio_reset(); + + INFO("MTK System Reset\n"); + + gpio_set_value(gpio_reset->index, gpio_reset->polarity); + + wfi(); + ERROR("MTK System Reset: operation not handled.\n"); + panic(); +} + static const plat_psci_ops_t plat_psci_ops = { + .system_reset = plat_mtk_system_reset, .cpu_standby = plat_cpu_standby, .pwr_domain_on = plat_power_domain_on, .pwr_domain_on_finish = plat_power_domain_on_finish,