mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-24 05:54:08 +00:00

This patch mainly collects and organizes SPM state information to facilitate debugging when issues arise. Signed-off-by: Wenzhen Yu <wenzhen.yu@mediatek.com> Change-Id: Ie51cffeb1d683d65d88701fc63c426b20b22492f
43 lines
723 B
C
43 lines
723 B
C
/*
|
|
* Copyright (c) 2025, Mediatek Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef MT_SPM_STATS_H
|
|
#define MT_SPM_STATS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
enum spm_stat_type {
|
|
SPM_SLP_COUNT,
|
|
SPM_SLP_DURATION,
|
|
};
|
|
|
|
enum spm_stat_state {
|
|
SPM_STAT_MCUSYS,
|
|
SPM_STAT_F26M,
|
|
SPM_STAT_VCORE,
|
|
SPM_STAT_D1_2,
|
|
SPM_STAT_D2,
|
|
SPM_STAT_D3,
|
|
SPM_STAT_D4,
|
|
SPM_STAT_D6X,
|
|
NUM_SPM_STAT,
|
|
};
|
|
|
|
struct spm_lp_stat_record {
|
|
uint64_t count;
|
|
uint64_t duration;
|
|
};
|
|
|
|
struct spm_lp_stat {
|
|
struct spm_lp_stat_record record[NUM_SPM_STAT];
|
|
};
|
|
|
|
void mt_spm_update_lp_stat(struct spm_lp_stat *stat);
|
|
|
|
uint64_t mt_spm_get_lp_stat(struct spm_lp_stat *stat,
|
|
uint32_t index, uint32_t type);
|
|
|
|
#endif /* MT_SPM_STATS_H */
|