mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-25 14:25:44 +00:00
fix(tegra): append major revision to the chip_id value
This patch appends the chip's major revision to the chip id value to form the SoC version value expected by the SMCCC_GET_SOC_VERSION function ID. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: I09118f446f6b8198588826d4a161bd97dcb6a581
This commit is contained in:
parent
4121a2c320
commit
33c476601c
1 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2021, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2020-2021, NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2020-2023, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -272,10 +272,12 @@ bool tegra_platform_is_virt_dev_kit(void)
|
|||
*/
|
||||
int32_t plat_get_soc_version(void)
|
||||
{
|
||||
uint32_t chip_id = ((tegra_get_chipid() >> CHIP_ID_SHIFT) & CHIP_ID_MASK);
|
||||
uint32_t chip_id = (tegra_get_chipid() >> CHIP_ID_SHIFT) & CHIP_ID_MASK;
|
||||
uint32_t major_rev = tegra_get_chipid_major();
|
||||
uint32_t manfid = SOC_ID_SET_JEP_106(JEDEC_NVIDIA_BKID, JEDEC_NVIDIA_MFID);
|
||||
|
||||
return (int32_t)(manfid | (chip_id & SOC_ID_IMPL_DEF_MASK));
|
||||
return (int32_t)(manfid | (((chip_id << MAJOR_VERSION_SHIFT) | major_rev) &
|
||||
SOC_ID_IMPL_DEF_MASK));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue