aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish V Badarkhe <Manish.Badarkhe@arm.com>2020-07-24 02:05:24 +0100
committerManish V Badarkhe <Manish.Badarkhe@arm.com>2020-07-26 08:16:42 +0100
commit0a2126a572190d28c01534ac2c716c778fecd7b0 (patch)
tree8ce1f66ec829b43e95a4049aa2076f3987df7810
parentc7bacd40d8f260ff69952158c907819f3510e36a (diff)
downloadtrusted-firmware-a-0a2126a572190d28c01534ac2c716c778fecd7b0.tar.gz
plat/nvidia: tegra: Enable SMCCC_ARCH_SOC_ID feature
Enabled 'SMCCC_ARCH_SOC_ID' feature for Nvidia Tegra platforms. Change-Id: If17415f42304c6518aeead8dfe5909c378aaa777 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
-rw-r--r--plat/nvidia/tegra/common/tegra_platform.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/plat/nvidia/tegra/common/tegra_platform.c b/plat/nvidia/tegra/common/tegra_platform.c
index e4338b963..080413575 100644
--- a/plat/nvidia/tegra/common/tegra_platform.c
+++ b/plat/nvidia/tegra/common/tegra_platform.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -8,6 +8,8 @@
#include <arch_helpers.h>
#include <assert.h>
#include <lib/mmio.h>
+#include <lib/smccc.h>
+#include <services/arm_arch_svc.h>
#include <tegra_def.h>
#include <tegra_platform.h>
#include <tegra_private.h>
@@ -286,3 +288,21 @@ int32_t plat_get_soc_revision(void)
{
return (int32_t)((tegra_get_chipid_major() << 8) | tegra_get_chipid_minor());
}
+
+/*****************************************************************************
+ * plat_smccc_feature_available() - This function checks whether SMCCC feature
+ * is availabile for the platform or not.
+ * @fid: SMCCC function id
+ *
+ * Return SMC_ARCH_CALL_SUCCESS if SMCCC feature is available and
+ * SMC_ARCH_CALL_NOT_SUPPORTED otherwise.
+ *****************************************************************************/
+int32_t plat_smccc_feature_available(u_register_t fid)
+{
+ switch (fid) {
+ case SMCCC_ARCH_SOC_ID:
+ return SMC_ARCH_CALL_SUCCESS;
+ default:
+ return SMC_ARCH_CALL_NOT_SUPPORTED;
+ }
+}