Commit 26c0d9b2 authored by Varun Wadekar's avatar Varun Wadekar
Browse files

Tegra: implement pwr_domain_pwr_down_wfi() handler



This patch adds the pwr_domain_power_down_wfi() handler for Tegra
platforms which in turn executes the soc specific `power_down_wfi`
handler.

Change-Id: I5deecc09959db3c3d73f928f5c871966331cfd95
Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
parent 260ae46f
...@@ -54,6 +54,7 @@ extern uint64_t tegra_sec_entry_point; ...@@ -54,6 +54,7 @@ extern uint64_t tegra_sec_entry_point;
#pragma weak tegra_soc_pwr_domain_on #pragma weak tegra_soc_pwr_domain_on
#pragma weak tegra_soc_pwr_domain_off #pragma weak tegra_soc_pwr_domain_off
#pragma weak tegra_soc_pwr_domain_on_finish #pragma weak tegra_soc_pwr_domain_on_finish
#pragma weak tegra_soc_pwr_domain_power_down_wfi
#pragma weak tegra_soc_prepare_system_reset #pragma weak tegra_soc_prepare_system_reset
#pragma weak tegra_soc_prepare_system_off #pragma weak tegra_soc_prepare_system_off
...@@ -77,6 +78,11 @@ int tegra_soc_pwr_domain_on_finish(const psci_power_state_t *target_state) ...@@ -77,6 +78,11 @@ int tegra_soc_pwr_domain_on_finish(const psci_power_state_t *target_state)
return PSCI_E_SUCCESS; return PSCI_E_SUCCESS;
} }
int tegra_soc_pwr_domain_power_down_wfi(const psci_power_state_t *target_state)
{
return PSCI_E_SUCCESS;
}
int tegra_soc_prepare_system_reset(void) int tegra_soc_prepare_system_reset(void)
{ {
return PSCI_E_SUCCESS; return PSCI_E_SUCCESS;
...@@ -136,7 +142,7 @@ void tegra_pwr_domain_off(const psci_power_state_t *target_state) ...@@ -136,7 +142,7 @@ void tegra_pwr_domain_off(const psci_power_state_t *target_state)
} }
/******************************************************************************* /*******************************************************************************
* Handler called when called when a power domain is about to be suspended. The * Handler called when a power domain is about to be suspended. The
* target_state encodes the power state that each level should transition to. * target_state encodes the power state that each level should transition to.
******************************************************************************/ ******************************************************************************/
void tegra_pwr_domain_suspend(const psci_power_state_t *target_state) void tegra_pwr_domain_suspend(const psci_power_state_t *target_state)
...@@ -147,6 +153,24 @@ void tegra_pwr_domain_suspend(const psci_power_state_t *target_state) ...@@ -147,6 +153,24 @@ void tegra_pwr_domain_suspend(const psci_power_state_t *target_state)
tegra_gic_cpuif_deactivate(); tegra_gic_cpuif_deactivate();
} }
/*******************************************************************************
* Handler called at the end of the power domain suspend sequence. The
* target_state encodes the power state that each level should transition to.
******************************************************************************/
__dead2 void tegra_pwr_domain_power_down_wfi(const psci_power_state_t
*target_state)
{
/* call the chip's power down handler */
tegra_soc_pwr_domain_power_down_wfi(target_state);
/* enter power down state */
wfi();
/* we can never reach here */
ERROR("%s: operation not handled.\n", __func__);
panic();
}
/******************************************************************************* /*******************************************************************************
* Handler called when a power domain has just been powered on after * Handler called when a power domain has just been powered on after
* being turned off earlier. The target_state encodes the low power state that * being turned off earlier. The target_state encodes the low power state that
...@@ -259,6 +283,7 @@ static const plat_psci_ops_t tegra_plat_psci_ops = { ...@@ -259,6 +283,7 @@ static const plat_psci_ops_t tegra_plat_psci_ops = {
.pwr_domain_suspend = tegra_pwr_domain_suspend, .pwr_domain_suspend = tegra_pwr_domain_suspend,
.pwr_domain_on_finish = tegra_pwr_domain_on_finish, .pwr_domain_on_finish = tegra_pwr_domain_on_finish,
.pwr_domain_suspend_finish = tegra_pwr_domain_suspend_finish, .pwr_domain_suspend_finish = tegra_pwr_domain_suspend_finish,
.pwr_domain_pwr_down_wfi = tegra_pwr_domain_power_down_wfi,
.system_off = tegra_system_off, .system_off = tegra_system_off,
.system_reset = tegra_system_reset, .system_reset = tegra_system_reset,
.validate_power_state = tegra_validate_power_state, .validate_power_state = tegra_validate_power_state,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment