]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
platform: zynqmp: add a common EEMI header
authorIzhar Ameer Shaikh <izhar.ameer.shaikh@xilinx.com>
Tue, 3 Dec 2019 02:37:14 +0000 (18:37 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 4 Dec 2019 23:58:10 +0000 (15:58 -0800)
This patch adds a new common header to be used for generic PM
EEMI definitions. In addition, header guards are also added to
xilinx-zynqmp-mm.h and xilinx-zynqmp-eemi.h files.

Following unused emums are also removed:
 - pm_node_id
 - pm_request_ack
 - pm_abort_reason
 - pm_suspend_reason
 - pm_ram_state
 - pm_opchar_type

Signed-off-by: Izhar Ameer Shaikh <izhar.ameer.shaikh@xilinx.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
xen/arch/arm/platforms/xilinx-zynqmp.c
xen/include/asm-arm/platforms/xilinx-eemi.h [new file with mode: 0644]
xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h
xen/include/asm-arm/platforms/xilinx-zynqmp-mm.h

index 67e75849b80eac42366436ed57725a384003a310..36ea03c2108e899ef42f3bd2ad3f77514a34fc3f 100644 (file)
@@ -20,6 +20,7 @@
 #include <xen/iocap.h>
 #include <xen/sched.h>
 #include <asm/smccc.h>
+#include <asm/platforms/xilinx-eemi.h>
 #include <asm/platforms/xilinx-zynqmp-eemi.h>
 #include <asm/platforms/xilinx-zynqmp-mm.h>
 
index 3060d79b346763d7bafeec9c2056887f7c710ffe..a1cf8c14523b33bd4d93e79176e431ff0508c0db 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <asm/platform.h>
+#include <asm/platforms/xilinx-eemi.h>
 #include <asm/platforms/xilinx-zynqmp-eemi.h>
 #include <asm/smccc.h>
 
diff --git a/xen/include/asm-arm/platforms/xilinx-eemi.h b/xen/include/asm-arm/platforms/xilinx-eemi.h
new file mode 100644 (file)
index 0000000..cbc78ba
--- /dev/null
@@ -0,0 +1,118 @@
+#ifndef __ASM_ARM_PLATFORMS_XILINX_EEMI_H
+#define __ASM_ARM_PLATFORMS_XILINX_EEMI_H
+
+#define EEMI_FID(fid) ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
+                                         ARM_SMCCC_CONV_64,   \
+                                         ARM_SMCCC_OWNER_SIP, \
+                                         fid)
+
+/* IPI SMC function numbers enum definition and fids */
+#define IPI_MAILBOX_FID(fid) ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
+                                                ARM_SMCCC_CONV_32,   \
+                                                ARM_SMCCC_OWNER_SIP, \
+                                                fid)
+enum ipi_api_id {
+    IPI_MAILBOX_OPEN = 0x1000,
+    IPI_MAILBOX_RELEASE,
+    IPI_MAILBOX_STATUS_ENQUIRY,
+    IPI_MAILBOX_NOTIFY,
+    IPI_MAILBOX_ACK,
+    IPI_MAILBOX_ENABLE_IRQ,
+    IPI_MAILBOX_DISABLE_IRQ,
+};
+
+enum pm_api_id {
+    /* Miscellaneous API functions: */
+    PM_GET_API_VERSION = 1, /* Do not change or move */
+    PM_SET_CONFIGURATION,
+    PM_GET_NODE_STATUS,
+    PM_GET_OP_CHARACTERISTIC,
+    PM_REGISTER_NOTIFIER,
+    /* API for suspending of PUs: */
+    PM_REQ_SUSPEND,
+    PM_SELF_SUSPEND,
+    PM_FORCE_POWERDOWN,
+    PM_ABORT_SUSPEND,
+    PM_REQ_WAKEUP,
+    PM_SET_WAKEUP_SOURCE,
+    PM_SYSTEM_SHUTDOWN,
+    /* API for managing PM slaves: */
+    PM_REQ_NODE,
+    PM_RELEASE_NODE,
+    PM_SET_REQUIREMENT,
+    PM_SET_MAX_LATENCY,
+    /* Direct control API functions: */
+    PM_RESET_ASSERT,
+    PM_RESET_GET_STATUS,
+    PM_MMIO_WRITE,
+    PM_MMIO_READ,
+    PM_INIT,
+    PM_FPGA_LOAD,
+    PM_FPGA_GET_STATUS,
+    PM_GET_CHIPID,
+    /* ID 25 is been used by U-boot to process secure boot images */
+    /* Secure library generic API functions */
+    PM_SECURE_SHA = 26,
+    PM_SECURE_RSA,
+    /* Pin control API functions */
+    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 API */
+    PM_IOCTL,
+    /* API to query information from firmware */
+    PM_QUERY_DATA,
+    /* Clock control API functions */
+    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,
+    /* PLL control API functions */
+    PM_PLL_SET_PARAMETER = 48,
+    PM_PLL_GET_PARAMETER,
+    PM_PLL_SET_MODE,
+    PM_PLL_GET_MODE,
+    /* PM Feature Check */
+    PM_FEATURE_CHECK = 63,
+    PM_GET_TRUSTZONE_VERSION = 2563,
+    PM_API_MAX
+};
+
+/**
+ * @XST_PM_SUCCESS:            Success
+ * @XST_PM_ARGS:               illegal arguments provided (deprecated)
+ * @XST_PM_NOTSUPPORTED:       feature not supported  (deprecated)
+ * @XST_PM_INVALID_PARAM:      invalid argument
+ * @XST_PM_INTERNAL:   Unexpected error
+ * @XST_PM_CONFLICT:   Conflicting requirements
+ * @XST_PM_NO_ACCESS:  Access rights violation
+ * @XST_PM_INVALID_NODE:       Does not apply to node passed as argument
+ * @XST_PM_DOUBLE_REQ: Duplicate request
+ * @XST_PM_ABORT_SUSPEND:      Target has aborted suspend
+ * @XST_PM_TIMEOUT:            timeout in communication with PMU
+ * @XST_PM_NODE_USED:          node is already in use
+ */
+enum pm_ret_status {
+    XST_PM_SUCCESS = 0,
+    XST_PM_ARGS = 1,
+    XST_PM_NOTSUPPORTED = 4,
+    XST_PM_INVALID_PARAM = 15,
+    XST_PM_INTERNAL = 2000,
+    XST_PM_CONFLICT,
+    XST_PM_NO_ACCESS,
+    XST_PM_INVALID_NODE,
+    XST_PM_DOUBLE_REQ,
+    XST_PM_ABORT_SUSPEND,
+    XST_PM_TIMEOUT,
+    XST_PM_NODE_USED
+};
+
+#endif /* __ASM_ARM_PLATFORMS_XILINX_EEMI_H */
index ea913474d61f24b810e8fb2c7bb28eeb6206c23f..7e8ed208571040ce8f0c2b93d7b2ba868b7c8008 100644 (file)
 #define ZYNQMP_SIP_SVC_UID              0xff01
 #define ZYNQMP_SIP_SVC_VERSION          0xff03
 
-#define EEMI_FID(fid) ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
-                                         ARM_SMCCC_CONV_64,   \
-                                         ARM_SMCCC_OWNER_SIP, \
-                                         fid)
-enum pm_api_id {
-    /* Miscellaneous API functions: */
-    PM_GET_API_VERSION = 1, /* Do not change or move */
-    PM_SET_CONFIGURATION,
-    PM_GET_NODE_STATUS,
-    PM_GET_OP_CHARACTERISTIC,
-    PM_REGISTER_NOTIFIER,
-    /* API for suspending of PUs: */
-    PM_REQ_SUSPEND,
-    PM_SELF_SUSPEND,
-    PM_FORCE_POWERDOWN,
-    PM_ABORT_SUSPEND,
-    PM_REQ_WAKEUP,
-    PM_SET_WAKEUP_SOURCE,
-    PM_SYSTEM_SHUTDOWN,
-    /* API for managing PM slaves: */
-    PM_REQ_NODE,
-    PM_RELEASE_NODE,
-    PM_SET_REQUIREMENT,
-    PM_SET_MAX_LATENCY,
-    /* Direct control API functions: */
-    PM_RESET_ASSERT,
-    PM_RESET_GET_STATUS,
-    PM_MMIO_WRITE,
-    PM_MMIO_READ,
-    PM_INIT,
-    PM_FPGA_LOAD,
-    PM_FPGA_GET_STATUS,
-    PM_GET_CHIPID,
-    /* ID 25 is been used by U-boot to process secure boot images */
-    /* Secure library generic API functions */
-    PM_SECURE_SHA = 26,
-    PM_SECURE_RSA,
-    /* Pin control API functions */
-    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 API */
-    PM_IOCTL,
-    /* API to query information from firmware */
-    PM_QUERY_DATA,
-    /* Clock control API functions */
-    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,
-    /* PLL control API functions */
-    PM_PLL_SET_PARAMETER = 48,
-    PM_PLL_GET_PARAMETER,
-    PM_PLL_SET_MODE,
-    PM_PLL_GET_MODE,
-    PM_GET_TRUSTZONE_VERSION = 2563,
-    PM_API_MAX
-};
-
-/**
- * @XST_PM_SUCCESS:            Success
- * @XST_PM_ARGS:               illegal arguments provided (deprecated)
- * @XST_PM_NOTSUPPORTED:       feature not supported  (deprecated)
- * @XST_PM_INVALID_PARAM:      invalid argument
- * @XST_PM_INTERNAL:   Unexpected error
- * @XST_PM_CONFLICT:   Conflicting requirements
- * @XST_PM_NO_ACCESS:  Access rights violation
- * @XST_PM_INVALID_NODE:       Does not apply to node passed as argument
- * @XST_PM_DOUBLE_REQ: Duplicate request
- * @XST_PM_ABORT_SUSPEND:      Target has aborted suspend
- * @XST_PM_TIMEOUT:            timeout in communication with PMU
- * @XST_PM_NODE_USED:          node is already in use
- */
-enum pm_ret_status {
-    XST_PM_SUCCESS = 0,
-    XST_PM_ARGS = 1,
-    XST_PM_NOTSUPPORTED = 4,
-    XST_PM_INVALID_PARAM = 15,
-    XST_PM_INTERNAL = 2000,
-    XST_PM_CONFLICT,
-    XST_PM_NO_ACCESS,
-    XST_PM_INVALID_NODE,
-    XST_PM_DOUBLE_REQ,
-    XST_PM_ABORT_SUSPEND,
-    XST_PM_TIMEOUT,
-    XST_PM_NODE_USED
-};
-
-/* IPI SMC function numbers enum definition and fids */
-#define IPI_MAILBOX_FID(fid) ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
-                                                ARM_SMCCC_CONV_32,   \
-                                                ARM_SMCCC_OWNER_SIP, \
-                                                fid)
-enum ipi_api_id {
-    IPI_MAILBOX_OPEN = 0x1000,
-    IPI_MAILBOX_RELEASE,
-    IPI_MAILBOX_STATUS_ENQUIRY,
-    IPI_MAILBOX_NOTIFY,
-    IPI_MAILBOX_ACK,
-    IPI_MAILBOX_ENABLE_IRQ,
-    IPI_MAILBOX_DISABLE_IRQ,
-};
-
 enum pm_node_id {
        PM_DEV_UNKNOWN = 0,
        PM_DEV_APU,
index 47921ad28b9af326b40078d57674b8f4919271da..36452dae84312c2302f41127e22874c538c3ae06 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef __ASM_ARM_PLATFORMS_XILINX_ZYNQMP_MM_H
+#define __ASM_ARM_PLATFORMS_XILINX_ZYNQMP_MM_H
+
 /*
  * Merge of various auto-generated memory map and register
  * definition files.
 #define R_IOU_SLCR_IOU_RAM_CAN1           0x51c
 #define R_IOU_SLCR_IOU_RAM_LQSPI          0x520
 #define R_IOU_SLCR_IOU_RAM_NAND           0x524
+
+#endif /* __ASM_ARM_PLATFORMS_XILINX_ZYNQMP_MM_H */