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