• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /*!
8  * Header file for the PM RPC implementation.
9  *
10  * @addtogroup PM_SVC
11  * @{
12  */
13 
14 #ifndef SCI_PM_RPC_H
15 #define SCI_PM_RPC_H
16 
17 /* Includes */
18 
19 /* Defines */
20 
21 /*!
22  * @name Defines for RPC PM function calls
23  */
24 /*@{*/
25 #define PM_FUNC_UNKNOWN 0	/* Unknown function */
26 #define PM_FUNC_SET_SYS_POWER_MODE 19U	/* Index for pm_set_sys_power_mode() RPC call */
27 #define PM_FUNC_SET_PARTITION_POWER_MODE 1U	/* Index for pm_set_partition_power_mode() RPC call */
28 #define PM_FUNC_GET_SYS_POWER_MODE 2U	/* Index for pm_get_sys_power_mode() RPC call */
29 #define PM_FUNC_SET_RESOURCE_POWER_MODE 3U	/* Index for pm_set_resource_power_mode() RPC call */
30 #define PM_FUNC_GET_RESOURCE_POWER_MODE 4U	/* Index for pm_get_resource_power_mode() RPC call */
31 #define PM_FUNC_REQ_LOW_POWER_MODE 16U	/* Index for pm_req_low_power_mode() RPC call */
32 #define PM_FUNC_REQ_CPU_LOW_POWER_MODE 20U	/* Index for pm_req_cpu_low_power_mode() RPC call */
33 #define PM_FUNC_SET_CPU_RESUME_ADDR 17U	/* Index for pm_set_cpu_resume_addr() RPC call */
34 #define PM_FUNC_SET_CPU_RESUME 21U	/* Index for pm_set_cpu_resume() RPC call */
35 #define PM_FUNC_REQ_SYS_IF_POWER_MODE 18U	/* Index for pm_req_sys_if_power_mode() RPC call */
36 #define PM_FUNC_SET_CLOCK_RATE 5U	/* Index for pm_set_clock_rate() RPC call */
37 #define PM_FUNC_GET_CLOCK_RATE 6U	/* Index for pm_get_clock_rate() RPC call */
38 #define PM_FUNC_CLOCK_ENABLE 7U	/* Index for pm_clock_enable() RPC call */
39 #define PM_FUNC_SET_CLOCK_PARENT 14U	/* Index for pm_set_clock_parent() RPC call */
40 #define PM_FUNC_GET_CLOCK_PARENT 15U	/* Index for pm_get_clock_parent() RPC call */
41 #define PM_FUNC_RESET 13U	/* Index for pm_reset() RPC call */
42 #define PM_FUNC_RESET_REASON 10U	/* Index for pm_reset_reason() RPC call */
43 #define PM_FUNC_BOOT 8U		/* Index for pm_boot() RPC call */
44 #define PM_FUNC_REBOOT 9U	/* Index for pm_reboot() RPC call */
45 #define PM_FUNC_REBOOT_PARTITION 12U	/* Index for pm_reboot_partition() RPC call */
46 #define PM_FUNC_CPU_START 11U	/* Index for pm_cpu_start() RPC call */
47 /*@}*/
48 
49 /* Types */
50 
51 /* Functions */
52 
53 /*!
54  * This function dispatches an incoming PM RPC request.
55  *
56  * @param[in]     caller_pt   caller partition
57  * @param[in]     msg         pointer to RPC message
58  */
59 void pm_dispatch(sc_rm_pt_t caller_pt, sc_rpc_msg_t *msg);
60 
61 /*!
62  * This function translates and dispatches an PM RPC request.
63  *
64  * @param[in]     ipc         IPC handle
65  * @param[in]     msg         pointer to RPC message
66  */
67 void pm_xlate(sc_ipc_t ipc, sc_rpc_msg_t *msg);
68 
69 #endif /* SCI_PM_RPC_H */
70 
71 /**@}*/
72