blob: b9b40dde39caab7131302d38630b41bf0c45ed1b [file] [log] [blame]
Wendy Liang3aebacf2017-09-13 11:02:42 -07001/*
2 * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/* ZynqMP IPI management enums and defines */
8
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00009#ifndef ZYNQMP_IPI_H
10#define ZYNQMP_IPI_H
Wendy Liang3aebacf2017-09-13 11:02:42 -070011
12#include <stdint.h>
13
14/*********************************************************************
15 * IPI agent IDs macros
16 ********************************************************************/
17#define IPI_ID_APU 0U
18#define IPI_ID_RPU0 1U
19#define IPI_ID_RPU1 2U
20#define IPI_ID_PMU0 3U
21#define IPI_ID_PMU1 4U
22#define IPI_ID_PMU2 5U
23#define IPI_ID_PMU3 6U
24#define IPI_ID_PL0 7U
25#define IPI_ID_PL1 8U
26#define IPI_ID_PL2 9U
27#define IPI_ID_PL3 10U
28
29/*********************************************************************
30 * IPI mailbox status macros
31 ********************************************************************/
32#define IPI_MB_STATUS_IDLE 0
33#define IPI_MB_STATUS_SEND_PENDING 1
34#define IPI_MB_STATUS_RECV_PENDING 2
35
36/*********************************************************************
37 * IPI mailbox call is secure or not macros
38 ********************************************************************/
39#define IPI_MB_CALL_NOTSECURE 0
40#define IPI_MB_CALL_SECURE 1
41
42/*********************************************************************
43 * IPI APIs declarations
44 ********************************************************************/
45
46/* Validate IPI mailbox access */
47int ipi_mb_validate(uint32_t local, uint32_t remote, unsigned int is_secure);
48
49/* Open the IPI mailbox */
50void ipi_mb_open(uint32_t local, uint32_t remote);
51
52/* Release the IPI mailbox */
53void ipi_mb_release(uint32_t local, uint32_t remote);
54
55/* Enquire IPI mailbox status */
56int ipi_mb_enquire_status(uint32_t local, uint32_t remote);
57
58/* Trigger notification on the IPI mailbox */
59void ipi_mb_notify(uint32_t local, uint32_t remote, uint32_t is_blocking);
60
61/* Ack IPI mailbox notification */
62void ipi_mb_ack(uint32_t local, uint32_t remote);
63
64/* Disable IPI mailbox notification interrupt */
65void ipi_mb_disable_irq(uint32_t local, uint32_t remote);
66
67/* Enable IPI mailbox notification interrupt */
68void ipi_mb_enable_irq(uint32_t local, uint32_t remote);
69
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000070#endif /* ZYNQMP_IPI_H */