1 /* 2 * Copyright (c) 2019-2022, Xilinx, Inc. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef PM_API_SYS_H 8 #define PM_API_SYS_H 9 10 #include <stdint.h> 11 #include "pm_defs.h" 12 13 /********************************************************** 14 * PM API function declarations 15 **********************************************************/ 16 17 enum pm_ret_status pm_handle_eemi_call(uint32_t flag, uint32_t x0, uint32_t x1, 18 uint32_t x2, uint32_t x3, uint32_t x4, 19 uint32_t x5, uint64_t *result); 20 enum pm_ret_status pm_self_suspend(uint32_t nid, 21 uint32_t latency, 22 uint32_t state, 23 uintptr_t address, uint32_t flag); 24 enum pm_ret_status pm_abort_suspend(enum pm_abort_reason reason, uint32_t flag); 25 enum pm_ret_status pm_req_suspend(uint32_t target, 26 uint8_t ack, 27 uint32_t latency, 28 uint32_t state, uint32_t flag); 29 enum pm_ret_status pm_req_wakeup(uint32_t target, uint32_t set_address, 30 uintptr_t address, uint8_t ack, uint32_t flag); 31 enum pm_ret_status pm_set_wakeup_source(uint32_t target, uint32_t device_id, 32 uint8_t enable, uint32_t flag); 33 void pm_get_callbackdata(uint32_t *data, size_t count, uint32_t flag); 34 enum pm_ret_status pm_pll_set_param(uint32_t clk_id, uint32_t param, 35 uint32_t value, uint32_t flag); 36 enum pm_ret_status pm_pll_get_param(uint32_t clk_id, uint32_t param, 37 uint32_t *value, uint32_t flag); 38 enum pm_ret_status pm_pll_set_mode(uint32_t clk_id, uint32_t mode, 39 uint32_t flag); 40 enum pm_ret_status pm_pll_get_mode(uint32_t clk_id, uint32_t *mode, 41 uint32_t flag); 42 enum pm_ret_status pm_force_powerdown(uint32_t target, uint8_t ack, 43 uint32_t flag); 44 enum pm_ret_status pm_system_shutdown(uint32_t type, uint32_t subtype, 45 uint32_t flag); 46 enum pm_ret_status pm_api_ioctl(uint32_t device_id, uint32_t ioctl_id, 47 uint32_t arg1, uint32_t arg2, uint32_t arg3, 48 uint32_t *value, uint32_t flag); 49 enum pm_ret_status pm_query_data(uint32_t qid, uint32_t arg1, uint32_t arg2, 50 uint32_t arg3, uint32_t *data, uint32_t flag); 51 uint32_t pm_get_shutdown_scope(void); 52 enum pm_ret_status pm_feature_check(uint32_t api_id, uint32_t *ret_payload, 53 uint32_t flag); 54 enum pm_ret_status pm_load_pdi(uint32_t src, uint32_t address_low, 55 uint32_t address_high, uint32_t flag); 56 enum pm_ret_status pm_register_notifier(uint32_t device_id, uint32_t event, 57 uint32_t wake, uint32_t enable, 58 uint32_t flag); 59 #endif /* PM_API_SYS_H */ 60