1 /*
2  * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef PM_IPI_H
8 #define PM_IPI_H
9 
10 #include <plat_ipi.h>
11 #include "pm_common.h"
12 
13 #define IPI_BLOCKING		1
14 #define IPI_NON_BLOCKING	0
15 
16 int32_t pm_ipi_init(const struct pm_proc *proc);
17 
18 enum pm_ret_status pm_ipi_send(const struct pm_proc *proc,
19 			       uint32_t payload[PAYLOAD_ARG_CNT]);
20 enum pm_ret_status pm_ipi_send_non_blocking(const struct pm_proc *proc,
21 					    uint32_t payload[PAYLOAD_ARG_CNT]);
22 enum pm_ret_status pm_ipi_send_sync(const struct pm_proc *proc,
23 				    uint32_t payload[PAYLOAD_ARG_CNT],
24 				    uint32_t *value, size_t count);
25 void pm_ipi_buff_read_callb(uint32_t *value, size_t count);
26 void pm_ipi_irq_enable(const struct pm_proc *proc);
27 void pm_ipi_irq_clear(const struct pm_proc *proc);
28 uint32_t pm_ipi_irq_status(const struct pm_proc *proc);
29 #if IPI_CRC_CHECK
30 uint32_t calculate_crc(uint32_t payload[PAYLOAD_ARG_CNT], uint32_t buffersize);
31 #endif
32 
33 #endif /* PM_IPI_H */
34