aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2020-03-31 07:42:46 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2020-03-31 07:42:46 +0000
commit93b2434f678e42c31de4c867aafe56a9b4f5e473 (patch)
tree6ab2db15e1d4eba48d820772043dc52fff8738b9
parent3be86517ed4b79007ebe7a5978c5858a3c5d8175 (diff)
parent2a3dd384599dc3e092a1aa1e2a3757482a158bc3 (diff)
downloadplatform_external_arm-trusted-firmware-93b2434f678e42c31de4c867aafe56a9b4f5e473.tar.gz
platform_external_arm-trusted-firmware-93b2434f678e42c31de4c867aafe56a9b4f5e473.tar.bz2
platform_external_arm-trusted-firmware-93b2434f678e42c31de4c867aafe56a9b4f5e473.zip
Merge "Tegra: fixup GIC init from the 'on_finish' handler" into integration
-rw-r--r--plat/nvidia/tegra/common/tegra_pm.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/plat/nvidia/tegra/common/tegra_pm.c b/plat/nvidia/tegra/common/tegra_pm.c
index 5ec6f849e..0430048e2 100644
--- a/plat/nvidia/tegra/common/tegra_pm.c
+++ b/plat/nvidia/tegra/common/tegra_pm.c
@@ -152,16 +152,18 @@ void tegra_pwr_domain_on_finish(const psci_power_state_t *target_state)
const plat_params_from_bl2_t *plat_params;
/*
- * Initialize the GIC cpu and distributor interfaces
- */
- tegra_gic_pcpu_init();
-
- /*
* Check if we are exiting from deep sleep.
*/
if (target_state->pwr_domain_state[PLAT_MAX_PWR_LVL] ==
PSTATE_ID_SOC_POWERDN) {
+ /*
+ * On entering System Suspend state, the GIC loses power
+ * completely. Initialize the GIC global distributor and
+ * GIC cpu interfaces.
+ */
+ tegra_gic_init();
+
/* Restart console output. */
console_switch_state(CONSOLE_FLAG_RUNTIME);
@@ -183,6 +185,11 @@ void tegra_pwr_domain_on_finish(const psci_power_state_t *target_state)
* access
*/
tegra_memctrl_tzram_setup(TEGRA_TZRAM_BASE, TEGRA_TZRAM_SIZE);
+ } else {
+ /*
+ * Initialize the GIC cpu and distributor interfaces
+ */
+ tegra_gic_pcpu_init();
}
/*