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:
parent
cbd6331beb
commit
26f3dbe2d6
|
@ -19,6 +19,7 @@
|
||||||
#include <plat_mtk_lpm.h>
|
#include <plat_mtk_lpm.h>
|
||||||
#include <plat_params.h>
|
#include <plat_params.h>
|
||||||
#include <plat_pm.h>
|
#include <plat_pm.h>
|
||||||
|
#include <pmic.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cluster state request:
|
* 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]));
|
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)
|
static void __dead2 plat_mtk_system_reset(void)
|
||||||
{
|
{
|
||||||
struct bl_aux_gpio_info *gpio_reset = plat_get_mtk_gpio_reset();
|
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_off = plat_power_domain_off,
|
||||||
.pwr_domain_suspend = plat_power_domain_suspend,
|
.pwr_domain_suspend = plat_power_domain_suspend,
|
||||||
.pwr_domain_suspend_finish = plat_power_domain_suspend_finish,
|
.pwr_domain_suspend_finish = plat_power_domain_suspend_finish,
|
||||||
|
.system_off = plat_mtk_system_off,
|
||||||
.validate_power_state = plat_validate_power_state,
|
.validate_power_state = plat_validate_power_state,
|
||||||
.get_sys_suspend_power_state = plat_get_sys_suspend_power_state
|
.get_sys_suspend_power_state = plat_get_sys_suspend_power_state
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue