arm64: versal: Clean pm_api_id usage
authorMichal Simek <michal.simek@xilinx.com>
Fri, 4 Oct 2019 13:25:18 +0000 (15:25 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 24 Oct 2019 11:37:01 +0000 (13:37 +0200)
Copy enum values from platform code to firmware code. IDs are shared
between ZynqMP and Versal.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/mach-versal/cpu.c
arch/arm/mach-versal/include/mach/sys_proto.h
drivers/clk/clk_versal.c
include/zynqmp_firmware.h

index 49f1e51c8ea52c38857d7fb6fd8f364712da955a..60394e761eded7dedcc57a0a39e88269b7ed6bf7 100644 (file)
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
+#include <zynqmp_firmware.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 2f5ad02bf476602e43b0a71b00736b66f3f7b4d7..c282078f8626f5337614b6b8c7521b0720d18ac0 100644 (file)
@@ -8,61 +8,6 @@ enum {
        TCM_SPLIT,
 };
 
-enum pm_api_id {
-       PM_GET_API_VERSION = 1,
-       PM_SET_CONFIGURATION,
-       PM_GET_NODE_STATUS,
-       PM_GET_OPERATING_CHARACTERISTIC,
-       PM_REGISTER_NOTIFIER,
-       PM_REQUEST_SUSPEND,
-       PM_SELF_SUSPEND,
-       PM_FORCE_POWERDOWN,
-       PM_ABORT_SUSPEND,
-       PM_REQUEST_WAKEUP,
-       PM_SET_WAKEUP_SOURCE,
-       PM_SYSTEM_SHUTDOWN,
-       PM_REQUEST_NODE,
-       PM_RELEASE_NODE,
-       PM_SET_REQUIREMENT,
-       PM_SET_MAX_LATENCY,
-       PM_RESET_ASSERT,
-       PM_RESET_GET_STATUS,
-       PM_MMIO_WRITE,
-       PM_MMIO_READ,
-       PM_PM_INIT_FINALIZE,
-       PM_FPGA_LOAD,
-       PM_FPGA_GET_STATUS,
-       PM_GET_CHIPID,
-       PM_SECURE_SHA = 26,
-       PM_SECURE_RSA,
-       PM_PINCTRL_REQUEST,
-       PM_PINCTRL_RELEASE,
-       PM_PINCTRL_GET_FUNCTION,
-       PM_PINCTRL_SET_FUNCTION,
-       PM_PINCTRL_CONFIG_PARAM_GET,
-       PM_PINCTRL_CONFIG_PARAM_SET,
-       PM_IOCTL,
-       PM_QUERY_DATA,
-       PM_CLOCK_ENABLE,
-       PM_CLOCK_DISABLE,
-       PM_CLOCK_GETSTATE,
-       PM_CLOCK_SETDIVIDER,
-       PM_CLOCK_GETDIVIDER,
-       PM_CLOCK_SETRATE,
-       PM_CLOCK_GETRATE,
-       PM_CLOCK_SETPARENT,
-       PM_CLOCK_GETPARENT,
-       PM_SECURE_IMAGE,
-       PM_FPGA_READ = 46,
-       PM_SECURE_AES,
-       PM_CLOCK_PLL_GETPARAM = 49,
-       PM_REGISTER_ACCESS = 52,
-       PM_EFUSE_ACCESS,
-       PM_FEATURE_CHECK = 63,
-       PM_API_MAX,
-};
-
-#define PM_SIP_SVC     0xC2000000
 #define PAYLOAD_ARG_CNT        4U
 
 void tcm_init(u8 mode);
index df87645774c530f9adbb3bd60d1d01a1a8ee38fb..e0fa661be9e081e2b73b92322e2e33bb4033868b 100644 (file)
@@ -12,6 +12,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <asm/arch/sys_proto.h>
+#include <zynqmp_firmware.h>
 
 #define MAX_PARENT                     100
 #define MAX_NODES                      6
index a20cbcdb869ec6867367edea5e4369552e8b5232..742934814cb0e2593c57a8c3f6099b7f242578ef 100644 (file)
 enum pm_api_id {
        PM_GET_API_VERSION = 1,
        PM_SET_CONFIGURATION,
-       PM_SECURE_IMAGE = 45,
+       PM_GET_NODE_STATUS,
+       PM_GET_OPERATING_CHARACTERISTIC,
+       PM_REGISTER_NOTIFIER,
+       PM_REQUEST_SUSPEND,
+       PM_SELF_SUSPEND,
+       PM_FORCE_POWERDOWN,
+       PM_ABORT_SUSPEND,
+       PM_REQUEST_WAKEUP,
+       PM_SET_WAKEUP_SOURCE,
+       PM_SYSTEM_SHUTDOWN,
+       PM_REQUEST_NODE,
+       PM_RELEASE_NODE,
+       PM_SET_REQUIREMENT,
+       PM_SET_MAX_LATENCY,
+       PM_RESET_ASSERT,
+       PM_RESET_GET_STATUS,
+       PM_MMIO_WRITE,
+       PM_MMIO_READ,
+       PM_PM_INIT_FINALIZE,
+       PM_FPGA_LOAD,
+       PM_FPGA_GET_STATUS,
+       PM_GET_CHIPID,
+       PM_SECURE_SHA = 26,
+       PM_SECURE_RSA,
+       PM_PINCTRL_REQUEST,
+       PM_PINCTRL_RELEASE,
+       PM_PINCTRL_GET_FUNCTION,
+       PM_PINCTRL_SET_FUNCTION,
+       PM_PINCTRL_CONFIG_PARAM_GET,
+       PM_PINCTRL_CONFIG_PARAM_SET,
+       PM_IOCTL,
+       PM_QUERY_DATA,
+       PM_CLOCK_ENABLE,
+       PM_CLOCK_DISABLE,
+       PM_CLOCK_GETSTATE,
+       PM_CLOCK_SETDIVIDER,
+       PM_CLOCK_GETDIVIDER,
+       PM_CLOCK_SETRATE,
+       PM_CLOCK_GETRATE,
+       PM_CLOCK_SETPARENT,
+       PM_CLOCK_GETPARENT,
+       PM_SECURE_IMAGE,
+       PM_FPGA_READ = 46,
+       PM_SECURE_AES,
+       PM_CLOCK_PLL_GETPARAM = 49,
+       PM_REGISTER_ACCESS = 52,
+       PM_EFUSE_ACCESS,
+       PM_FEATURE_CHECK = 63,
+       PM_API_MAX,
 };
 
 #define PM_SIP_SVC      0xc2000000