zynqmp: pm: Allow to set shutdown scope via pm_system_shutdown API

psci system_reset and system_off calls now retrieve shutdown scope on
the fly. The default scope is system, but it can be changed by calling
pm_system_shutdown(2, scope)

Until full support for different restart scopes becomes available with
PSCI 1.1 this change allows users to set the reboot scope to match
their application needs.

Possible scope values:
0 - APU subsystem: does not affect RPU, PMU or PL
1 - PS only: shutdown/restart entire PS without affecting PL
2 - System: shutdown/restart applies to entire system

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Davorin Mista <davorin.mista@aggios.com>
diff --git a/plat/xilinx/zynqmp/plat_psci.c b/plat/xilinx/zynqmp/plat_psci.c
index 27cdddb..d0df6a8 100644
--- a/plat/xilinx/zynqmp/plat_psci.c
+++ b/plat/xilinx/zynqmp/plat_psci.c
@@ -249,7 +249,7 @@
 
 	/* Send the power down request to the PMU */
 	pm_system_shutdown(PMF_SHUTDOWN_TYPE_SHUTDOWN,
-			   PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM);
+			   pm_get_shutdown_scope());
 
 	while (1)
 		wfi();
@@ -284,7 +284,7 @@
 
 	/* Send the system reset request to the PMU */
 	pm_system_shutdown(PMF_SHUTDOWN_TYPE_RESET,
-			   PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM);
+			   pm_get_shutdown_scope());
 
 	while (1)
 		wfi();