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
28/* SMC SIP service Call Function Identifier Prefix */28/* SMC SIP service Call Function Identifier Prefix */
29#define PM_SIP_SVC 0xC200000029#define PM_SIP_SVC 0xC2000000
30#define PM_GET_TRUSTZONE_VERSION 0xa0330#define PM_GET_TRUSTZONE_VERSION 0xa03
31#define PM_SET_SUSPEND_MODE 0xa02
32#define GET_CALLBACK_DATA 0xa01
31 33
32/* Number of 32bits values in payload */34/* Number of 32bits values in payload */
33#define PAYLOAD_ARG_CNT 4U35#define PAYLOAD_ARG_CNT 4U
34 36
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
35enum pm_api_id {43enum pm_api_id {
36 PM_GET_API_VERSION = 1,44 PM_GET_API_VERSION = 1,
37 PM_RESET_ASSERT = 17,45 PM_RESET_ASSERT = 17,
38 PM_RESET_GET_STATUS,46 PM_RESET_GET_STATUS,
47 PM_PM_INIT_FINALIZE = 21,
39 PM_GET_CHIPID = 24,48 PM_GET_CHIPID = 24,
40 PM_IOCTL = 34,49 PM_IOCTL = 34,
41 PM_QUERY_DATA,50 PM_QUERY_DATA,
@@ -209,6 +218,12 @@ enum zynqmp_pm_reset { · 167 unmodified lines
209 ZYNQMP_PM_RESET_END = ZYNQMP_PM_RESET_PS_PL3218 ZYNQMP_PM_RESET_END = ZYNQMP_PM_RESET_PS_PL3
210};219};
211 220
221enum zynqmp_pm_suspend_reason {
222 SUSPEND_POWER_REQUEST = 201,
223 SUSPEND_ALERT,
224 SUSPEND_SYSTEM_SHUTDOWN,
225};
226
212/**227/**
213 * struct zynqmp_pm_query_data - PM query data228 * struct zynqmp_pm_query_data - PM query data
214 * @qid: query ID229 * @qid: query ID
@@ -240,8 +255,13 @@ struct zynqmp_eemi_ops { · 25 unmodified lines
240 int (*reset_assert)(const enum zynqmp_pm_reset reset,255 int (*reset_assert)(const enum zynqmp_pm_reset reset,
241 const enum zynqmp_pm_reset_action assert_flag);256 const enum zynqmp_pm_reset_action assert_flag);
242 int (*reset_get_status)(const enum zynqmp_pm_reset reset, u32 *status);257 int (*reset_get_status)(const enum zynqmp_pm_reset reset, u32 *status);
258 int (*init_finalize)(void);
259 int (*set_suspend_mode)(u32 mode);
243};260};
244 261
262int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1,
263 u32 arg2, u32 arg3, u32 *ret_payload);
264
245#if IS_REACHABLE(CONFIG_ARCH_ZYNQMP)265#if IS_REACHABLE(CONFIG_ARCH_ZYNQMP)
246const struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void);266const struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void);
247#else267#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