Browse Source

Tegra: PM: soc-specific system off handler

This patch introduces a power down handler which can be overriden
by SoCs to customise the power down process. The current SoCs do
not have a way of powering down the entire system as external PMIC
chips are involved in the process.

But future SoCs will have a way to power off the entire system
without talking to an external PMIC.

Change-Id: Ie7750714141a29cb0a1a616fafc531c4f11d0985
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
pull/849/head
Varun Wadekar 9 years ago
parent
commit
31a4957cd3
  1. 14
      plat/nvidia/tegra/common/tegra_pm.c

14
plat/nvidia/tegra/common/tegra_pm.c

@ -55,6 +55,7 @@ extern uint64_t tegra_sec_entry_point;
#pragma weak tegra_soc_pwr_domain_off
#pragma weak tegra_soc_pwr_domain_on_finish
#pragma weak tegra_soc_prepare_system_reset
#pragma weak tegra_soc_prepare_system_off
int tegra_soc_pwr_domain_suspend(const psci_power_state_t *target_state)
{
@ -81,6 +82,12 @@ int tegra_soc_prepare_system_reset(void)
return PSCI_E_SUCCESS;
}
__dead2 void tegra_soc_prepare_system_off(void)
{
ERROR("Tegra System Off: operation not handled.\n");
panic();
}
/*******************************************************************************
* This handler is called by the PSCI implementation during the `SYSTEM_SUSPEND`
* call to get the `power_state` parameter. This allows the platform to encode
@ -199,8 +206,9 @@ void tegra_pwr_domain_suspend_finish(const psci_power_state_t *target_state)
******************************************************************************/
__dead2 void tegra_system_off(void)
{
ERROR("Tegra System Off: operation not handled.\n");
panic();
INFO("Powering down system...\n");
tegra_soc_prepare_system_off();
}
/*******************************************************************************
@ -208,6 +216,8 @@ __dead2 void tegra_system_off(void)
******************************************************************************/
__dead2 void tegra_system_reset(void)
{
INFO("Restarting system...\n");
/* per-SoC system reset handler */
tegra_soc_prepare_system_reset();

Loading…
Cancel
Save