From 26fefad5125eca514b0f5bd8fb28bdcf07cf4e7c Mon Sep 17 00:00:00 2001 From: Balaji Gontumukkala Date: Wed, 19 Feb 2025 06:11:03 +0000 Subject: [PATCH] SCMI Clock Test 17, Attributes Parameter is incorrect - Added mask to attributes parameter to get only clock state from clock attributes saved value. --- test_pool/clock/test_c017.c | 3 ++- val/include/val_clock.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test_pool/clock/test_c017.c b/test_pool/clock/test_c017.c index a586148..f4b9e0d 100644 --- a/test_pool/clock/test_c017.c +++ b/test_pool/clock/test_c017.c @@ -1,5 +1,5 @@ /** @file - * Copyright (c) 2020-2024, Arm Limited or its affiliates. All rights reserved. + * Copyright (c) 2020-2025, Arm Limited or its affiliates. All rights reserved. * SPDX-License-Identifier : Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -79,6 +79,7 @@ uint32_t clock_config_set_check(uint32_t version) run_flag = 1; /* Find new attribute from previously stored value */ attributes = val_clock_get_info(CLOCK_ATTRIBUTE, clock_id); + attributes = attributes & CLOCK_ATTRIBUTES_STATE_MASK; if ((attributes & 0x1) == CONFIG_SET_DISABLE) attributes = CONFIG_SET_ENABLE; else diff --git a/val/include/val_clock.h b/val/include/val_clock.h index 4576399..01004e0 100644 --- a/val/include/val_clock.h +++ b/val/include/val_clock.h @@ -1,5 +1,5 @@ /** @file - * Copyright (c) 2019-2020, 2023-2024, Arm Limited or its affiliates. All rights reserved. + * Copyright (c) 2019-2020, 2023-2025, Arm Limited or its affiliates. All rights reserved. * SPDX-License-Identifier : Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -53,7 +53,7 @@ #define CLOCK_RATE_FMT_STEP_SIZE 0x1 #define CLOCK_DUTY_CYCLE_EXT_CONFIG 0x1 #define CLOCK_PHASE_EXT_CONFIG 0x2 - +#define CLOCK_ATTRIBUTES_STATE_MASK 0x1 #define MAX_NUM_OF_CLOCKS 10 -- GitLab