diff options
author | Marek Vasut <marek.vasut+renesas@gmail.com> | 2018-12-31 17:12:45 +0100 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@gmail.com> | 2019-01-08 14:08:44 +0100 |
commit | b51a773ec334f2068a481c79a21b2c314fe9125d (patch) | |
tree | 2bde7e526b90c9022f259e99e7e7bc1ac64a0e59 /plat/renesas | |
parent | bc5fabd813e65967e0929d402fc437829c222564 (diff) |
rcar_gen3: plat: Clean up rcar_pwrc_code_copy_to_system_ram()
Call the function only from architecture setup and at the end of
suspend cycle instead of calling it all over the place.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Diffstat (limited to 'plat/renesas')
-rw-r--r-- | plat/renesas/rcar/bl31_plat_setup.c | 1 | ||||
-rw-r--r-- | plat/renesas/rcar/plat_pm.c | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/plat/renesas/rcar/bl31_plat_setup.c b/plat/renesas/rcar/bl31_plat_setup.c index c648a070..4e08b5a8 100644 --- a/plat/renesas/rcar/bl31_plat_setup.c +++ b/plat/renesas/rcar/bl31_plat_setup.c @@ -100,6 +100,7 @@ void bl31_plat_arch_setup(void) , BL31_COHERENT_RAM_BASE, BL31_COHERENT_RAM_LIMIT #endif ); + rcar_pwrc_code_copy_to_system_ram(); } void bl31_platform_setup(void) diff --git a/plat/renesas/rcar/plat_pm.c b/plat/renesas/rcar/plat_pm.c index 7086613f..dbf3ac54 100644 --- a/plat/renesas/rcar/plat_pm.c +++ b/plat/renesas/rcar/plat_pm.c @@ -155,6 +155,7 @@ static void rcar_pwr_domain_suspend_finish(const psci_power_state_t write_cntfrq_el0(plat_get_syscnt_freq2()); mmio_write_32(RCAR_CNTC_BASE + CNTCR_OFF, CNTCR_FCREQ(U(0)) | CNTCR_EN); rcar_pwrc_setup(); + rcar_pwrc_code_copy_to_system_ram(); #if RCAR_SYSTEM_SUSPEND rcar_pwrc_init_suspend_to_ram(); @@ -167,11 +168,9 @@ static void __dead2 rcar_system_off(void) { #if PMIC_ROHM_BD9571 #if PMIC_LEVEL_MODE - rcar_pwrc_code_copy_to_system_ram(); if (rcar_iic_dvfs_send(PMIC, DVFS_SET_VID, DVFS_SET_VID_0V)) ERROR("BL3-1:Failed the SYSTEM-OFF.\n"); #else - rcar_pwrc_code_copy_to_system_ram(); if (rcar_iic_dvfs_send(PMIC, BKUP_MODE_CNT, P_ALL_OFF)) ERROR("BL3-1:Failed the SYSTEM-RESET.\n"); #endif @@ -204,7 +203,6 @@ static void __dead2 rcar_system_reset(void) uint8_t mode; int32_t error; - rcar_pwrc_code_copy_to_system_ram(); error = rcar_iic_dvfs_send(PMIC, REG_KEEP10, KEEP10_MAGIC); if (error) { ERROR("Failed send KEEP10 magic ret=%d \n", error); @@ -227,7 +225,6 @@ static void __dead2 rcar_system_reset(void) rcar_pwrc_set_suspend_to_ram(); done: #else - rcar_pwrc_code_copy_to_system_ram(); if (rcar_iic_dvfs_send(PMIC, BKUP_MODE_CNT, P_ALL_OFF)) ERROR("BL3-1:Failed the SYSTEM-RESET.\n"); #endif |