From 0ed0ca2840fdab865efa8366a34c217a97bd62b4 Mon Sep 17 00:00:00 2001 From: Gaurav Kashyap Date: Wed, 16 Jun 2021 12:06:49 -0700 Subject: [PATCH] tz_log: update TZ version for enlarged buf Update the TZ version to include the latest diag version when choosing to use enlarged buffers. Change-Id: Icd285c171957d0ddf6d4e9980bae33fa7b5eb9ec Signed-off-by: Gaurav Kashyap --- drivers/firmware/qcom/tz_log.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/qcom/tz_log.c b/drivers/firmware/qcom/tz_log.c index 12bce5de2bbe..c14d513a6708 100644 --- a/drivers/firmware/qcom/tz_log.c +++ b/drivers/firmware/qcom/tz_log.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. */ #include #include @@ -35,7 +35,8 @@ #define TZBSP_FVER_MINOR_SHIFT 12 #define TZBSP_DIAG_MAJOR_VERSION_V9 9 #define TZBSP_DIAG_MINOR_VERSION_V2 2 -#define TZBSP_DIAG_MINOR_VERSION_V21 3 +#define TZBSP_DIAG_MINOR_VERSION_V21 3 +#define TZBSP_DIAG_MINOR_VERSION_V22 4 /* TZ Diag Feature Version Id */ #define QCOM_SCM_FEAT_DIAG_ID 0x06 @@ -1454,7 +1455,9 @@ static int tzdbg_get_tz_version(void) ((((version >> TZBSP_FVER_MINOR_SHIFT) & TZBSP_FVER_MAJOR_MINOR_MASK) == TZBSP_DIAG_MINOR_VERSION_V2) || (((version >> TZBSP_FVER_MINOR_SHIFT) & TZBSP_FVER_MAJOR_MINOR_MASK) - == TZBSP_DIAG_MINOR_VERSION_V21))) + == TZBSP_DIAG_MINOR_VERSION_V21) || + (((version >> TZBSP_FVER_MINOR_SHIFT) & TZBSP_FVER_MAJOR_MINOR_MASK) + == TZBSP_DIAG_MINOR_VERSION_V22))) tzdbg.is_enlarged_buf = true; else tzdbg.is_enlarged_buf = false;