mediatek: mt8192: add power-off support

add power-off support

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Change-Id: If19e99971515a8ae1ac9ae21046e4382adc18a69
This commit is contained in:
Hsin-Hsiung Wang 2020-08-12 16:32:10 +08:00 committed by Manish Pandey
parent cbd6331beb
commit 26f3dbe2d6
1 changed files with 13 additions and 0 deletions

View File

@ -19,6 +19,7 @@
#include <plat_mtk_lpm.h>
#include <plat_params.h>
#include <plat_pm.h>
#include <pmic.h>
/*
* Cluster state request:
@ -334,6 +335,17 @@ static void plat_get_sys_suspend_power_state(psci_power_state_t *req_state)
sizeof(plat_power_state[cpu]));
}
static void __dead2 plat_mtk_system_off(void)
{
INFO("MTK System Off\n");
pmic_power_off();
wfi();
ERROR("MTK System Off: operation not handled.\n");
panic();
}
static void __dead2 plat_mtk_system_reset(void)
{
struct bl_aux_gpio_info *gpio_reset = plat_get_mtk_gpio_reset();
@ -355,6 +367,7 @@ static const plat_psci_ops_t plat_psci_ops = {
.pwr_domain_off = plat_power_domain_off,
.pwr_domain_suspend = plat_power_domain_suspend,
.pwr_domain_suspend_finish = plat_power_domain_suspend_finish,
.system_off = plat_mtk_system_off,
.validate_power_state = plat_validate_power_state,
.get_sys_suspend_power_state = plat_get_sys_suspend_power_state
};