From bb788de30a74facb920448bb129d345eb0294b13 Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Fri, 9 Sep 2022 20:11:27 -0500 Subject: net: ipa: move the definition of gsi_ee_id Move the definition of the gsi_ee_id enumerated type out of "gsi.h" and into "ipa_version.h". That latter header file isolates the definition of the ipa_version enumerated type, allowing it to be included in both IPA and GSI code. We have the same requirement for gsi_ee_id, and moving it here makes it easier to get only that definition without everything else defined in "gsi.h". Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski --- drivers/net/ipa/ipa_version.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/net/ipa/ipa_version.h') diff --git a/drivers/net/ipa/ipa_version.h b/drivers/net/ipa/ipa_version.h index 6c16c895d842..852d6cbc8775 100644 --- a/drivers/net/ipa/ipa_version.h +++ b/drivers/net/ipa/ipa_version.h @@ -38,4 +38,12 @@ enum ipa_version { IPA_VERSION_4_11, }; +/* Execution environment IDs */ +enum gsi_ee_id { + GSI_EE_AP = 0x0, + GSI_EE_MODEM = 0x1, + GSI_EE_UC = 0x2, + GSI_EE_TZ = 0x3, +}; + #endif /* _IPA_VERSION_H_ */ -- cgit From 8b3cb084b23e0a8ab7ce748c7f27ba828b74cde9 Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Fri, 9 Sep 2022 20:11:28 -0500 Subject: net: ipa: move and redefine ipa_version_valid() Move the definition of ipa_version_valid(), making it a static inline function defined together with the enumerated type in "ipa_version.h". Define a new count value in the type. Rename the function to be ipa_version_supported(), and have it return true only if the IPA version supplied is explicitly supported by the driver. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski --- drivers/net/ipa/ipa_version.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'drivers/net/ipa/ipa_version.h') diff --git a/drivers/net/ipa/ipa_version.h b/drivers/net/ipa/ipa_version.h index 852d6cbc8775..58f7b43b4db3 100644 --- a/drivers/net/ipa/ipa_version.h +++ b/drivers/net/ipa/ipa_version.h @@ -19,10 +19,10 @@ * @IPA_VERSION_4_7: IPA version 4.7/GSI version 2.7 * @IPA_VERSION_4_9: IPA version 4.9/GSI version 2.9 * @IPA_VERSION_4_11: IPA version 4.11/GSI version 2.11 (2.1.1) + * @IPA_VERSION_COUNT: Number of defined IPA versions * * Defines the version of IPA (and GSI) hardware present on the platform. - * Please update ipa_version_valid() and ipa_version_string() whenever a - * new version is added. + * Please update ipa_version_string() whenever a new version is added. */ enum ipa_version { IPA_VERSION_3_0, @@ -36,8 +36,24 @@ enum ipa_version { IPA_VERSION_4_7, IPA_VERSION_4_9, IPA_VERSION_4_11, + IPA_VERSION_COUNT, /* Last; not a version */ }; +static inline bool ipa_version_supported(enum ipa_version version) +{ + switch (version) { + case IPA_VERSION_3_1: + case IPA_VERSION_3_5_1: + case IPA_VERSION_4_2: + case IPA_VERSION_4_5: + case IPA_VERSION_4_9: + case IPA_VERSION_4_11: + return true; + default: + return false; + } +} + /* Execution environment IDs */ enum gsi_ee_id { GSI_EE_AP = 0x0, -- cgit From a4388da51ad56366d330144975e50f162a10bd8b Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Fri, 30 Sep 2022 17:45:49 -0500 Subject: net: ipa: update copyrights Some source files state copyright dates that are earlier than the last modification of the file. Change the copyright year to 2022 in all such cases. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20220930224549.3503434-1-elder@linaro.org Signed-off-by: Jakub Kicinski --- drivers/net/ipa/ipa_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ipa/ipa_version.h') diff --git a/drivers/net/ipa/ipa_version.h b/drivers/net/ipa/ipa_version.h index 58f7b43b4db3..7870e0cc3d7c 100644 --- a/drivers/net/ipa/ipa_version.h +++ b/drivers/net/ipa/ipa_version.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. - * Copyright (C) 2019-2020 Linaro Ltd. + * Copyright (C) 2019-2022 Linaro Ltd. */ #ifndef _IPA_VERSION_H_ #define _IPA_VERSION_H_ -- cgit