blob: 30714643b99c64165758f9145485dafcb352be75 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
2 * Copyright (c) 2017, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef __AMU_H__
8#define __AMU_H__
9
10#include <platform_def.h>
11#include <stdint.h>
12
13#define AMU_GROUP0_NR_COUNTERS 4
14#define AMU_GROUP0_COUNTERS_MASK 0xf
15
16#ifdef PLAT_AMU_GROUP1_COUNTERS_MASK
17#define AMU_GROUP1_COUNTERS_MASK PLAT_AMU_GROUP1_COUNTERS_MASK
18#else
19#define AMU_GROUP1_COUNTERS_MASK 0
20#endif
21
22#ifdef PLAT_AMU_GROUP1_NR_COUNTERS
23#define AMU_GROUP1_NR_COUNTERS PLAT_AMU_GROUP1_NR_COUNTERS
24#else
25#define AMU_GROUP1_NR_COUNTERS 0
26#endif
27
28#define AMU_GROUP0_MAX_NR_COUNTERS 4
29#define AMU_GROUP1_MAX_NR_COUNTERS 16
30
31int amu_supported(void);
32uint64_t amu_group0_cnt_read(int idx);
33uint64_t amu_group1_cnt_read(int idx);
34
35#endif /* __AMU_H__ */