blob: ff3d26603ce8bd8fd168b75b8f5d9e8e0e62a19a [file] [log] [blame]
Tejas Patel354fe572018-12-14 00:55:37 -08001/*
2 * Copyright (c) 2019, Xilinx, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/* Versal power management enums and defines */
8
9#ifndef PM_DEFS_H
10#define PM_DEFS_H
11
12#include "pm_node.h"
13
14/*********************************************************************
15 * Macro definitions
16 ********************************************************************/
17
18/* Processor core device IDs */
19#define APU_DEVID(IDX) NODEID(XPM_NODECLASS_DEVICE, XPM_NODESUBCL_DEV_CORE, \
20 XPM_NODETYPE_DEV_CORE_APU, (IDX))
21
22#define XPM_DEVID_ACPU_0 APU_DEVID(XPM_NODEIDX_DEV_ACPU_0)
23#define XPM_DEVID_ACPU_1 APU_DEVID(XPM_NODEIDX_DEV_ACPU_1)
24
Tejas Patel9d09ff92019-01-08 01:46:35 -080025/* PM API ids */
26#define PM_GET_API_VERSION 1U
27
Tejas Patel354fe572018-12-14 00:55:37 -080028/*********************************************************************
29 * Enum definitions
30 ********************************************************************/
31
32/**
33 * @PM_RET_SUCCESS: success
34 * @PM_RET_ERROR_ARGS: illegal arguments provided (deprecated)
35 * @PM_RET_ERROR_NOTSUPPORTED: feature not supported (deprecated)
36 * @PM_RET_ERROR_INTERNAL: internal error
37 * @PM_RET_ERROR_CONFLICT: conflict
38 * @PM_RET_ERROR_ACCESS: access rights violation
39 * @PM_RET_ERROR_INVALID_NODE: invalid node
40 * @PM_RET_ERROR_DOUBLE_REQ: duplicate request for same node
41 * @PM_RET_ERROR_ABORT_SUSPEND: suspend procedure has been aborted
42 * @PM_RET_ERROR_TIMEOUT: timeout in communication with PMU
43 * @PM_RET_ERROR_NODE_USED: node is already in use
44 */
45enum pm_ret_status {
46 PM_RET_SUCCESS,
47 PM_RET_ERROR_ARGS = 1,
48 PM_RET_ERROR_NOTSUPPORTED = 4,
49 PM_RET_ERROR_INTERNAL = 2000,
50 PM_RET_ERROR_CONFLICT = 2001,
51 PM_RET_ERROR_ACCESS = 2002,
52 PM_RET_ERROR_INVALID_NODE = 2003,
53 PM_RET_ERROR_DOUBLE_REQ = 2004,
54 PM_RET_ERROR_ABORT_SUSPEND = 2005,
55 PM_RET_ERROR_TIMEOUT = 2006,
56 PM_RET_ERROR_NODE_USED = 2007
57};
58#endif /* PM_DEFS_H */