aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2020-03-20 10:12:03 -0700
committerVarun Wadekar <vwadekar@nvidia.com>2020-06-08 16:32:44 -0700
commit35106bd23a43797cd3ea74994498dc6cc1ceb812 (patch)
tree99cabf95fcd9aa889c20e13fd9fb83b78720cfb0
parent0107d76f084dde7e3efced050c9f0508d0310af8 (diff)
downloadtf-a-tests-35106bd23a43797cd3ea74994498dc6cc1ceb812.tar.gz
Tegra194: introduce system reset
This patch introduces the flexibility to reset the platform via the SMC_PSCI_SYSTEM_RESET function ID. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: I315315f1998d9b9d8f237ac05625328175880922
-rw-r--r--plat/nvidia/tegra194/platform.mk7
-rw-r--r--plat/nvidia/tegra194/reset.c18
2 files changed, 25 insertions, 0 deletions
diff --git a/plat/nvidia/tegra194/platform.mk b/plat/nvidia/tegra194/platform.mk
index d64e36d..46d6bf1 100644
--- a/plat/nvidia/tegra194/platform.mk
+++ b/plat/nvidia/tegra194/platform.mk
@@ -14,6 +14,7 @@ PLAT_SOURCES := drivers/arm/gic/arm_gic_v2.c \
plat/nvidia/tegra194/helpers.S \
plat/nvidia/tegra194/pwr_state.c \
plat/nvidia/tegra194/pwr_mgmt.c \
+ plat/nvidia/tegra194/reset.c \
plat/nvidia/tegra194/setup.c \
plat/nvidia/tegra194/topology.c \
plat/nvidia/tegra194/timers.c \
@@ -25,6 +26,12 @@ TFTF_CFLAGS += -Wno-maybe-uninitialized
ENABLE_ASSERTIONS := 1
+PLAT_SUPPORTS_NS_RESET := 1
+
+# Process PLAT_SUPPORTS_NS_RESET flag
+$(eval $(call assert_boolean,PLAT_SUPPORTS_NS_RESET))
+$(eval $(call add_define,TFTF_DEFINES,PLAT_SUPPORTS_NS_RESET))
+
ifeq ($(USE_NVM),1)
$(error "Tegra194 port of TFTF doesn't currently support USE_NVM=1")
endif
diff --git a/plat/nvidia/tegra194/reset.c b/plat/nvidia/tegra194/reset.c
new file mode 100644
index 0000000..2112be4
--- /dev/null
+++ b/plat/nvidia/tegra194/reset.c
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <platform.h>
+
+#include <psci.h>
+#include <tftf.h>
+
+void tftf_plat_reset(void)
+{
+ smc_args reset_args = { SMC_PSCI_SYSTEM_RESET };
+
+ (void)tftf_smc(&reset_args);
+ bug_unreachable();
+}