blob: c435b7ada6035e699240f683fdd732721d6e5d9a [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
25/*********************************************************************
26 * Enum definitions
27 ********************************************************************/
28
29/**
30 * @PM_RET_SUCCESS: success
31 * @PM_RET_ERROR_ARGS: illegal arguments provided (deprecated)
32 * @PM_RET_ERROR_NOTSUPPORTED: feature not supported (deprecated)
33 * @PM_RET_ERROR_INTERNAL: internal error
34 * @PM_RET_ERROR_CONFLICT: conflict
35 * @PM_RET_ERROR_ACCESS: access rights violation
36 * @PM_RET_ERROR_INVALID_NODE: invalid node
37 * @PM_RET_ERROR_DOUBLE_REQ: duplicate request for same node
38 * @PM_RET_ERROR_ABORT_SUSPEND: suspend procedure has been aborted
39 * @PM_RET_ERROR_TIMEOUT: timeout in communication with PMU
40 * @PM_RET_ERROR_NODE_USED: node is already in use
41 */
42enum pm_ret_status {
43 PM_RET_SUCCESS,
44 PM_RET_ERROR_ARGS = 1,
45 PM_RET_ERROR_NOTSUPPORTED = 4,
46 PM_RET_ERROR_INTERNAL = 2000,
47 PM_RET_ERROR_CONFLICT = 2001,
48 PM_RET_ERROR_ACCESS = 2002,
49 PM_RET_ERROR_INVALID_NODE = 2003,
50 PM_RET_ERROR_DOUBLE_REQ = 2004,
51 PM_RET_ERROR_ABORT_SUSPEND = 2005,
52 PM_RET_ERROR_TIMEOUT = 2006,
53 PM_RET_ERROR_NODE_USED = 2007
54};
55#endif /* PM_DEFS_H */