drivers: soc: qcom: rimps_memlat: add configs to get PMU/AMU count

Add CONFIG options to get the number of AMUs and PMUs supported on
a given target to define the size of structures accordingly in driver.

Change-Id: I6ed58465f789156887a28bd49da7220396854e50
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
This commit is contained in:
Santosh Mardi 2021-02-25 18:17:01 +05:30
commit a1e161fc46
2 changed files with 13 additions and 1 deletions

View file

@ -859,6 +859,17 @@ config QTI_HW_MEMLAT
table, PMU counters and saving the values of PMU counters during LPM and
hotplug.
config QTI_HW_NUM_AMU
int
default 7 if ARCH_LAHAINA && QTI_HW_MEMLAT
default 5 if ARCH_HOLI && QTI_HW_MEMLAT
default 5
config QTI_HW_NUM_PMU
int
default 6 if (ARCH_LAHAINA || ARCH_HOLI) && QTI_HW_MEMLAT
default 6
config QTI_HW_MEMLAT_SCMI_CLIENT
tristate "Qualcomm Technologies Inc. SCMI client driver for HW MEMLAT"
depends on QTI_HW_MEMLAT

View file

@ -102,7 +102,8 @@ struct core_dev_map {
struct cpu_pmu_ctrs {
uint32_t ccntr_lo;
uint32_t ccntr_hi;
uint32_t evcntr[MAX_EVCNTRS];
uint32_t evcntr[CONFIG_QTI_HW_NUM_PMU];
uint32_t amu_evcntr[CONFIG_QTI_HW_NUM_AMU * 2];
uint32_t valid;
uint32_t unused0;
};