feat(plat/rcar): change process for Suspend To RAM

- Added the function rcar_pwr_domain_pwr_down_wfi() for power down process.
  And change the sequence to power down.
- Removed clearing the count of psci_locks (PSCI exclusive lock) during
  Warm Boot.

Signed-off-by: Koichi Yamaguchi <koichi.yamaguchi.zb@hitachi.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I684d54a798a6dccde15fbebe16c6e104cbb470ed
This commit is contained in:
Toshiyuki Ogasahara 2021-07-12 19:29:52 +09:00 committed by Marek Vasut
parent 49593cc1ce
commit 731aa26f38

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2020, Renesas Electronics Corporation. All rights reserved.
* Copyright (c) 2015-2021, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -128,11 +128,6 @@ static void rcar_pwr_domain_suspend(const psci_power_state_t *target_state)
rcar_pwrc_clusteroff(mpidr);
}
#if RCAR_SYSTEM_SUSPEND
if (SYSTEM_PWR_STATE(target_state) == PLAT_MAX_OFF_STATE)
rcar_pwrc_suspend_to_ram();
#endif
}
static void rcar_pwr_domain_suspend_finish(const psci_power_state_t
@ -160,6 +155,18 @@ finish:
rcar_pwr_domain_on_finish(target_state);
}
static void __dead2 rcar_pwr_domain_pwr_down_wfi(const psci_power_state_t *target_state)
{
#if RCAR_SYSTEM_SUSPEND
if (SYSTEM_PWR_STATE(target_state) == PLAT_MAX_OFF_STATE)
rcar_pwrc_suspend_to_ram();
#endif
wfi();
ERROR("RCAR Power Down: operation not handled.\n");
panic();
}
static void __dead2 rcar_system_off(void)
{
#if PMIC_ROHM_BD9571
@ -292,6 +299,7 @@ static const plat_psci_ops_t rcar_plat_psci_ops = {
.system_off = rcar_system_off,
.system_reset = rcar_system_reset,
.validate_power_state = rcar_validate_power_state,
.pwr_domain_pwr_down_wfi = rcar_pwr_domain_pwr_down_wfi,
#if RCAR_SYSTEM_SUSPEND
.get_sys_suspend_power_state = rcar_get_sys_suspend_power_state,
#endif