1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * Description:
8  *      System Control and Management Interface (SCMI) protocol independent
9  *      definitions.
10  */
11 
12 #ifndef MOD_SCMI_POWER_CAPPING_UNIT_TEST_H
13 #define MOD_SCMI_POWER_CAPPING_UNIT_TEST_H
14 
15 #define FAKE_SCMI_MODULE_ID          0x5
16 #define FAKE_POWER_CAPPING_MODULE_ID 0x6
17 
18 enum fake_services {
19     FAKE_SERVICE_IDX_1,
20     FAKE_SERVICE_IDX_2,
21     FAKE_SERVICE_IDX_COUNT,
22 };
23 
24 enum fake_power_capping_domains {
25     FAKE_POWER_CAPPING_IDX_1,
26     FAKE_POWER_CAPPING_IDX_2,
27     FAKE_POWER_CAPPING_IDX_COUNT,
28 };
29 
30 #define FAKE_API_IDX_SCMI_TRANSPORT 0x3
31 #define FAKE_SCMI_AGENT_IDX_PSCI    0x6
32 #define FAKE_SCMI_AGENT_IDX_OSPM    0x7
33 
34 #define POWER_CAPPING_NOTIF_SUP_POS 31
35 #define POWER_MEAS_NOTIF_SUP_POS    30
36 #define ASYNC_POWER_CAP_POS         29
37 #define POWER_CAP_CONF_SUP_POS      27
38 #define POWER_CAP_MON_SUP_POS       26
39 #define PAI_CONF_SUP_POS            25
40 #define POWER_UNIT_POS              24
41 #define FAST_CHANNEL_SUP_POS        22
42 
43 #define ASYNC_FLAG(x)        (x << 1)
44 #define IGN_DEL_RESP_FLAG(x) (x)
45 
46 #define MIN_DEFAULT_PAI (10u)
47 #define MAX_DEFAULT_PAI (MIN_DEFAULT_PAI * 10u)
48 
49 #define MIN_DEFAULT_POWER_CAP (10u)
50 #define MAX_DEFAULT_POWER_CAP (MIN_DEFAULT_POWER_CAP * 10u)
51 
52 #define DISABLE_CAP_VALUE ((uint32_t)0)
53 
54 #define POWER_CAP_NOTIFY_ENABLE  (1)
55 #define POWER_CAP_NOTIFY_DISABLE (0)
56 
57 #define MEASUREMENTS_NOTIFY_ENABLE  (1)
58 #define MEASUREMENTS_NOTIFY_DISABLE (0)
59 
60 #endif /* MOD_SCMI_POWER_CAPPING_UNIT_TEST_H */
61