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
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/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 @@
 
 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();
+}