1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4 * Copyright (C) 2019-2022 Linaro Ltd. 5 */ 6 #ifndef _IPA_VERSION_H_ 7 #define _IPA_VERSION_H_ 8 9 /** 10 * enum ipa_version 11 * @IPA_VERSION_3_0: IPA version 3.0/GSI version 1.0 12 * @IPA_VERSION_3_1: IPA version 3.1/GSI version 1.1 13 * @IPA_VERSION_3_5: IPA version 3.5/GSI version 1.2 14 * @IPA_VERSION_3_5_1: IPA version 3.5.1/GSI version 1.3 15 * @IPA_VERSION_4_0: IPA version 4.0/GSI version 2.0 16 * @IPA_VERSION_4_1: IPA version 4.1/GSI version 2.0 17 * @IPA_VERSION_4_2: IPA version 4.2/GSI version 2.2 18 * @IPA_VERSION_4_5: IPA version 4.5/GSI version 2.5 19 * @IPA_VERSION_4_7: IPA version 4.7/GSI version 2.7 20 * @IPA_VERSION_4_9: IPA version 4.9/GSI version 2.9 21 * @IPA_VERSION_4_11: IPA version 4.11/GSI version 2.11 (2.1.1) 22 * @IPA_VERSION_5_0: IPA version 5.0/GSI version 3.0 23 * @IPA_VERSION_COUNT: Number of defined IPA versions 24 * 25 * Defines the version of IPA (and GSI) hardware present on the platform. 26 * Please update ipa_version_string() whenever a new version is added. 27 */ 28 enum ipa_version { 29 IPA_VERSION_3_0, 30 IPA_VERSION_3_1, 31 IPA_VERSION_3_5, 32 IPA_VERSION_3_5_1, 33 IPA_VERSION_4_0, 34 IPA_VERSION_4_1, 35 IPA_VERSION_4_2, 36 IPA_VERSION_4_5, 37 IPA_VERSION_4_7, 38 IPA_VERSION_4_9, 39 IPA_VERSION_4_11, 40 IPA_VERSION_5_0, 41 IPA_VERSION_COUNT, /* Last; not a version */ 42 }; 43 44 static inline bool ipa_version_supported(enum ipa_version version) 45 { 46 switch (version) { 47 case IPA_VERSION_3_1: 48 case IPA_VERSION_3_5_1: 49 case IPA_VERSION_4_2: 50 case IPA_VERSION_4_5: 51 case IPA_VERSION_4_7: 52 case IPA_VERSION_4_9: 53 case IPA_VERSION_4_11: 54 case IPA_VERSION_5_0: 55 return true; 56 default: 57 return false; 58 } 59 } 60 61 /* Execution environment IDs */ 62 enum gsi_ee_id { 63 GSI_EE_AP = 0x0, 64 GSI_EE_MODEM = 0x1, 65 GSI_EE_UC = 0x2, 66 GSI_EE_TZ = 0x3, 67 }; 68 69 #endif /* _IPA_VERSION_H_ */ 70