]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
Tegra186: implement prepare_system_off handler
authorVarun Wadekar <vwadekar@nvidia.com>
Tue, 14 Mar 2017 21:25:35 +0000 (14:25 -0700)
committerVarun Wadekar <vwadekar@nvidia.com>
Mon, 20 Mar 2017 16:12:20 +0000 (09:12 -0700)
This patch issues the 'System Off' ARI to power off the entire
system from the 'prepare_system_off' handler.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
plat/nvidia/tegra/soc/t186/plat_psci_handlers.c

index 35b7ee91565bf6a75c5702f72ac0f5831ae89f40..42f6d89b969015568d8c0ada8e2d9eced267ce76 100644 (file)
@@ -33,6 +33,7 @@
 #include <debug.h>
 #include <mce.h>
 #include <psci.h>
+#include <t18x_ari.h>
 #include <tegra_private.h>
 
 int32_t tegra_soc_validate_power_state(unsigned int power_state)
@@ -93,3 +94,8 @@ int tegra_soc_prepare_cpu_off(unsigned long mpidr)
        /* Turn off CPU */
        return mce_command_handler(MCE_CMD_ENTER_CSTATE, ~0, 0, 0);
 }
+
+__dead2 void tegra_soc_prepare_system_off(void)
+{
+       mce_enter_ccplex_state(TEGRA_ARI_MISC_CCPLEX_SHUTDOWN_POWER_OFF);
+}