1cdf2e941SAlex Elder /* SPDX-License-Identifier: GPL-2.0 */ 2cdf2e941SAlex Elder 3cdf2e941SAlex Elder /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4*a4388da5SAlex 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 12eb09457cSAlex Elder * @IPA_VERSION_3_1: IPA version 3.1/GSI version 1.1 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) 228b3cb084SAlex Elder * @IPA_VERSION_COUNT: Number of defined IPA versions 23cdf2e941SAlex Elder * 24cdf2e941SAlex Elder * Defines the version of IPA (and GSI) hardware present on the platform. 258b3cb084SAlex Elder * Please update ipa_version_string() whenever a new version is added. 26cdf2e941SAlex Elder */ 27cdf2e941SAlex Elder enum ipa_version { 28eb09457cSAlex Elder IPA_VERSION_3_0, 29eb09457cSAlex Elder IPA_VERSION_3_1, 30eb09457cSAlex Elder IPA_VERSION_3_5, 31eb09457cSAlex Elder IPA_VERSION_3_5_1, 32eb09457cSAlex Elder IPA_VERSION_4_0, 33eb09457cSAlex Elder IPA_VERSION_4_1, 34eb09457cSAlex Elder IPA_VERSION_4_2, 35eb09457cSAlex Elder IPA_VERSION_4_5, 36eb09457cSAlex Elder IPA_VERSION_4_7, 37eb09457cSAlex Elder IPA_VERSION_4_9, 38eb09457cSAlex Elder IPA_VERSION_4_11, 398b3cb084SAlex Elder IPA_VERSION_COUNT, /* Last; not a version */ 40cdf2e941SAlex Elder }; 41cdf2e941SAlex Elder 428b3cb084SAlex Elder static inline bool ipa_version_supported(enum ipa_version version) 438b3cb084SAlex Elder { 448b3cb084SAlex Elder switch (version) { 458b3cb084SAlex Elder case IPA_VERSION_3_1: 468b3cb084SAlex Elder case IPA_VERSION_3_5_1: 478b3cb084SAlex Elder case IPA_VERSION_4_2: 488b3cb084SAlex Elder case IPA_VERSION_4_5: 498b3cb084SAlex Elder case IPA_VERSION_4_9: 508b3cb084SAlex Elder case IPA_VERSION_4_11: 518b3cb084SAlex Elder return true; 528b3cb084SAlex Elder default: 538b3cb084SAlex Elder return false; 548b3cb084SAlex Elder } 558b3cb084SAlex Elder } 568b3cb084SAlex Elder 57bb788de3SAlex Elder /* Execution environment IDs */ 58bb788de3SAlex Elder enum gsi_ee_id { 59bb788de3SAlex Elder GSI_EE_AP = 0x0, 60bb788de3SAlex Elder GSI_EE_MODEM = 0x1, 61bb788de3SAlex Elder GSI_EE_UC = 0x2, 62bb788de3SAlex Elder GSI_EE_TZ = 0x3, 63bb788de3SAlex Elder }; 64bb788de3SAlex Elder 65cdf2e941SAlex Elder #endif /* _IPA_VERSION_H_ */ 66