mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
feat(tc): add save/restore DSU PMU register support
This patch adds support for preserving DSU PMU registers over a power cycle in TC platform. These PMU registers need to be manually saved/restored because they are part of cluster power domain and OS doesn't know when DSU is powered OFF. Change-Id: Ife9573f205d99d092039cb95674e7434bb5f9239 Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
This commit is contained in:
parent
f99a69c386
commit
b87d7ab13f
2 changed files with 15 additions and 2 deletions
|
@ -68,6 +68,9 @@ $(eval $(call add_defines, \
|
|||
|
||||
CSS_LOAD_SCP_IMAGES := 1
|
||||
|
||||
# Save DSU PMU registers on cluster off and restore them on cluster on
|
||||
PRESERVE_DSU_PMU_REGS := 1
|
||||
|
||||
# Include GICv3 driver files
|
||||
include drivers/arm/gic/v3/gicv3.mk
|
||||
|
||||
|
@ -128,6 +131,7 @@ BL31_SOURCES += ${INTERCONNECT_SOURCES} \
|
|||
${TC_BASE}/tc_topology.c \
|
||||
lib/fconf/fconf.c \
|
||||
lib/fconf/fconf_dyn_cfg_getter.c \
|
||||
drivers/arm/css/dsu/dsu.c \
|
||||
drivers/cfi/v2m/v2m_flash.c \
|
||||
lib/utils/mem_region.c \
|
||||
plat/arm/common/arm_nor_psci_mem_protect.c \
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <bl31/interrupt_mgmt.h>
|
||||
#include <common/debug.h>
|
||||
#include <drivers/arm/css/css_scp.h>
|
||||
#include <drivers/arm/css/dsu.h>
|
||||
#include <lib/cassert.h>
|
||||
#include <plat/arm/common/plat_arm.h>
|
||||
|
||||
|
@ -82,8 +83,12 @@ static void css_pwr_domain_on_finisher_common(
|
|||
* Perform the common cluster specific operations i.e enable coherency
|
||||
* if this cluster was off.
|
||||
*/
|
||||
if (CSS_CLUSTER_PWR_STATE(target_state) == ARM_LOCAL_STATE_OFF)
|
||||
if (CSS_CLUSTER_PWR_STATE(target_state) == ARM_LOCAL_STATE_OFF) {
|
||||
#if PRESERVE_DSU_PMU_REGS
|
||||
cluster_on_dsu_pmu_context_restore();
|
||||
#endif
|
||||
plat_arm_interconnect_enter_coherency();
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -131,8 +136,12 @@ static void css_power_down_common(const psci_power_state_t *target_state)
|
|||
plat_arm_gic_cpuif_disable();
|
||||
|
||||
/* Cluster is to be turned off, so disable coherency */
|
||||
if (CSS_CLUSTER_PWR_STATE(target_state) == ARM_LOCAL_STATE_OFF)
|
||||
if (CSS_CLUSTER_PWR_STATE(target_state) == ARM_LOCAL_STATE_OFF) {
|
||||
#if PRESERVE_DSU_PMU_REGS
|
||||
cluster_off_dsu_pmu_context_save();
|
||||
#endif
|
||||
plat_arm_interconnect_exit_coherency();
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
Loading…
Add table
Reference in a new issue