History

firmware: xilinx: Implement ZynqMP power management APIs

Add Xilinx ZynqMP firmware APIs to set suspend mode and inform firmware that master has initialized its own power management.

Jolly Shah committed 7 years ago

Commit e178df31 parent d4ff6c92 files · +49 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/firmware/xlnx-zynqmp.h+20−0
@@ -28,14 +28,23 @@ · 27 unmodified lines
2828 /* SMC SIP service Call Function Identifier Prefix */
2929 #define PM_SIP_SVC 0xC2000000
3030 #define PM_GET_TRUSTZONE_VERSION 0xa03
31+#define PM_SET_SUSPEND_MODE 0xa02
32+#define GET_CALLBACK_DATA 0xa01
3133
3234 /* Number of 32bits values in payload */
3335 #define PAYLOAD_ARG_CNT 4U
3436
37+/* Number of arguments for a callback */
38+#define CB_ARG_CNT 4
39+
40+/* Payload size (consists of callback API ID + arguments) */
41+#define CB_PAYLOAD_SIZE (CB_ARG_CNT + 1)
42+
3543 enum pm_api_id {
3644 PM_GET_API_VERSION = 1,
3745 PM_RESET_ASSERT = 17,
3846 PM_RESET_GET_STATUS,
47+ PM_PM_INIT_FINALIZE = 21,
3948 PM_GET_CHIPID = 24,
4049 PM_IOCTL = 34,
4150 PM_QUERY_DATA,
@@ -209,6 +218,12 @@ enum zynqmp_pm_reset { · 167 unmodified lines
209218 ZYNQMP_PM_RESET_END = ZYNQMP_PM_RESET_PS_PL3
210219 };
211220
221+enum zynqmp_pm_suspend_reason {
222+ SUSPEND_POWER_REQUEST = 201,
223+ SUSPEND_ALERT,
224+ SUSPEND_SYSTEM_SHUTDOWN,
225+};
226+
212227 /**
213228 * struct zynqmp_pm_query_data - PM query data
214229 * @qid: query ID
@@ -240,8 +255,13 @@ struct zynqmp_eemi_ops { · 25 unmodified lines
240255 int (*reset_assert)(const enum zynqmp_pm_reset reset,
241256 const enum zynqmp_pm_reset_action assert_flag);
242257 int (*reset_get_status)(const enum zynqmp_pm_reset reset, u32 *status);
258+ int (*init_finalize)(void);
259+ int (*set_suspend_mode)(u32 mode);
243260 };
244261
262+int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1,
263+ u32 arg2, u32 arg3, u32 *ret_payload);
264+
245265 #if IS_REACHABLE(CONFIG_ARCH_ZYNQMP)
246266 const struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void);
247267 #else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t