fix(plat/rcar3): fix SYSTEM_OFF processing for R-Car D3

Fixed an issue where the CPU and Cluster could not be turned OFF
when the SYSTEM_OFF has executed.

Signed-off-by: Hideyuki Nitta <hideyuki.nitta.jf@hitachi.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: Id476f815b58246ae0574c04ccb3eb201d09039b9
This commit is contained in:
Takuya Sakata 2021-12-01 13:37:02 +09:00 committed by Marek Vasut
parent b57d9d6f29
commit 1b49ba0fde
1 changed files with 9 additions and 6 deletions

View File

@ -178,19 +178,22 @@ static void __dead2 rcar_system_off(void)
ERROR("BL3-1:Failed the SYSTEM-RESET.\n");
#endif
#else
u_register_t cpu = read_mpidr_el1() & 0x0000ffffU;
u_register_t mpidr = read_mpidr_el1();
u_register_t cpu = mpidr & 0x0000ffffU;
int32_t rtn_on;
rtn_on = rcar_pwrc_cpu_on_check(cpu);
rtn_on = rcar_pwrc_cpu_on_check(mpidr);
if (cpu == rcar_boot_mpidr)
if (cpu != rcar_boot_mpidr) {
panic();
}
if (rtn_on)
if (rtn_on != 0) {
panic();
}
rcar_pwrc_cpuoff(cpu);
rcar_pwrc_clusteroff(cpu);
rcar_pwrc_cpuoff(mpidr);
rcar_pwrc_clusteroff(mpidr);
#endif /* PMIC_ROHM_BD9571 */
wfi();