diff options
author | Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com> | 2019-03-22 16:14:00 +0900 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@gmail.com> | 2019-04-11 12:57:03 +0200 |
commit | 7704ff9132a88435a4c3cd9906effebd12bbd4c5 (patch) | |
tree | 69cad60945b68627d6c72ad672ca5b81912a5567 /plat/renesas | |
parent | 4983f8b63c9df1e1cb3c472688ab91379d114949 (diff) |
rcar_gen3: drivers: Change to restore timer counter value at resume
Changed to save and restore cntpct_el0 using memory mapped
register for generic timer when System Suspend and Resume.
Reported by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I40fd9f5434c4d52b320cd1d20322b9b8e4e67155
Diffstat (limited to 'plat/renesas')
-rw-r--r-- | plat/renesas/rcar/plat_pm.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/plat/renesas/rcar/plat_pm.c b/plat/renesas/rcar/plat_pm.c index f41c172a..e678da5d 100644 --- a/plat/renesas/rcar/plat_pm.c +++ b/plat/renesas/rcar/plat_pm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved. + * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -35,8 +35,6 @@ #define CLUSTER_PWR_STATE(s) ((s)->pwr_domain_state[MPIDR_AFFLVL1]) #define CORE_PWR_STATE(s) ((s)->pwr_domain_state[MPIDR_AFFLVL0]) -uint64_t rcar_stack_generic_timer[5] __attribute__ ((section("data"))); - extern void rcar_pwrc_restore_generic_timer(uint64_t *stack); extern void plat_rcar_gic_driver_init(void); extern void plat_rcar_gic_init(void); @@ -150,11 +148,7 @@ static void rcar_pwr_domain_suspend_finish(const psci_power_state_t if (cluster_type == RCAR_CLUSTER_A53A57) plat_cci_init(); - rcar_pwrc_restore_generic_timer(rcar_stack_generic_timer); - - /* start generic timer */ - write_cntfrq_el0(plat_get_syscnt_freq2()); - mmio_write_32(RCAR_CNTC_BASE + CNTCR_OFF, CNTCR_FCREQ(U(0)) | CNTCR_EN); + rcar_pwrc_restore_timer_state(); rcar_pwrc_setup(); rcar_pwrc_code_copy_to_system_ram(); |