1cdf2e941SAlex Elder /* SPDX-License-Identifier: GPL-2.0 */
2cdf2e941SAlex Elder
3cdf2e941SAlex Elder /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4a4388da5SAlex Elder * Copyright (C) 2019-2022 Linaro Ltd.
5cdf2e941SAlex Elder */
6cdf2e941SAlex Elder #ifndef _IPA_VERSION_H_
7cdf2e941SAlex Elder #define _IPA_VERSION_H_
8cdf2e941SAlex Elder
9cdf2e941SAlex Elder /**
10cdf2e941SAlex Elder * enum ipa_version
11eb09457cSAlex Elder * @IPA_VERSION_3_0: IPA version 3.0/GSI version 1.0
12*3aac8ec1SAlex Elder * @IPA_VERSION_3_1: IPA version 3.1/GSI version 1.0
13eb09457cSAlex Elder * @IPA_VERSION_3_5: IPA version 3.5/GSI version 1.2
14eb09457cSAlex Elder * @IPA_VERSION_3_5_1: IPA version 3.5.1/GSI version 1.3
15eb09457cSAlex Elder * @IPA_VERSION_4_0: IPA version 4.0/GSI version 2.0
16eb09457cSAlex Elder * @IPA_VERSION_4_1: IPA version 4.1/GSI version 2.0
17eb09457cSAlex Elder * @IPA_VERSION_4_2: IPA version 4.2/GSI version 2.2
18eb09457cSAlex Elder * @IPA_VERSION_4_5: IPA version 4.5/GSI version 2.5
19eb09457cSAlex Elder * @IPA_VERSION_4_7: IPA version 4.7/GSI version 2.7
20eb09457cSAlex Elder * @IPA_VERSION_4_9: IPA version 4.9/GSI version 2.9
21eb09457cSAlex Elder * @IPA_VERSION_4_11: IPA version 4.11/GSI version 2.11 (2.1.1)
225783c68aSAlex Elder * @IPA_VERSION_5_0: IPA version 5.0/GSI version 3.0
23*3aac8ec1SAlex Elder * @IPA_VERSION_5_1: IPA version 5.1/GSI version 3.0
24*3aac8ec1SAlex Elder * @IPA_VERSION_5_5: IPA version 5.5/GSI version 5.5
258b3cb084SAlex Elder * @IPA_VERSION_COUNT: Number of defined IPA versions
26cdf2e941SAlex Elder *
27cdf2e941SAlex Elder * Defines the version of IPA (and GSI) hardware present on the platform.
288b3cb084SAlex Elder * Please update ipa_version_string() whenever a new version is added.
29cdf2e941SAlex Elder */
30cdf2e941SAlex Elder enum ipa_version {
31eb09457cSAlex Elder IPA_VERSION_3_0,
32eb09457cSAlex Elder IPA_VERSION_3_1,
33eb09457cSAlex Elder IPA_VERSION_3_5,
34eb09457cSAlex Elder IPA_VERSION_3_5_1,
35eb09457cSAlex Elder IPA_VERSION_4_0,
36eb09457cSAlex Elder IPA_VERSION_4_1,
37eb09457cSAlex Elder IPA_VERSION_4_2,
38eb09457cSAlex Elder IPA_VERSION_4_5,
39eb09457cSAlex Elder IPA_VERSION_4_7,
40eb09457cSAlex Elder IPA_VERSION_4_9,
41eb09457cSAlex Elder IPA_VERSION_4_11,
425783c68aSAlex Elder IPA_VERSION_5_0,
43*3aac8ec1SAlex Elder IPA_VERSION_5_1,
44*3aac8ec1SAlex Elder IPA_VERSION_5_5,
458b3cb084SAlex Elder IPA_VERSION_COUNT, /* Last; not a version */
46cdf2e941SAlex Elder };
47cdf2e941SAlex Elder
ipa_version_supported(enum ipa_version version)488b3cb084SAlex Elder static inline bool ipa_version_supported(enum ipa_version version)
498b3cb084SAlex Elder {
508b3cb084SAlex Elder switch (version) {
518b3cb084SAlex Elder case IPA_VERSION_3_1:
528b3cb084SAlex Elder case IPA_VERSION_3_5_1:
538b3cb084SAlex Elder case IPA_VERSION_4_2:
548b3cb084SAlex Elder case IPA_VERSION_4_5:
55b310de78SAlex Elder case IPA_VERSION_4_7:
568b3cb084SAlex Elder case IPA_VERSION_4_9:
578b3cb084SAlex Elder case IPA_VERSION_4_11:
585783c68aSAlex Elder case IPA_VERSION_5_0:
598b3cb084SAlex Elder return true;
608b3cb084SAlex Elder default:
618b3cb084SAlex Elder return false;
628b3cb084SAlex Elder }
638b3cb084SAlex Elder }
648b3cb084SAlex Elder
65bb788de3SAlex Elder /* Execution environment IDs */
66bb788de3SAlex Elder enum gsi_ee_id {
67bb788de3SAlex Elder GSI_EE_AP = 0x0,
68bb788de3SAlex Elder GSI_EE_MODEM = 0x1,
69bb788de3SAlex Elder GSI_EE_UC = 0x2,
70bb788de3SAlex Elder GSI_EE_TZ = 0x3,
71bb788de3SAlex Elder };
72bb788de3SAlex Elder
73cdf2e941SAlex Elder #endif /* _IPA_VERSION_H_ */
74