1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright 2020-2021 NXP
4  */
5 #ifndef __DRIVERS_IMX_MU_H
6 #define __DRIVERS_IMX_MU_H
7 
8 #include <tee_api_types.h>
9 #include <types_ext.h>
10 #include <util.h>
11 
12 #define MU_NB_RR 4
13 #define MU_NB_TR 4
14 
15 /*
16  * Clear GIE, RIE, TIE, GIR and F registers
17  *
18  * @base   Base address of the MU
19  */
20 void mu_init(vaddr_t base);
21 
22 /*
23  * Send a message through MU
24  *
25  * @base    Base address of the MU
26  * @index   Index of the TR register
27  * @msg     Message to send
28  */
29 TEE_Result mu_send_msg(vaddr_t base, unsigned int index, uint32_t msg);
30 
31 /*
32  * Receive a message through MU
33  *
34  * @base    Base address of the MU
35  * @index   Index of the RR register
36  * @msg     [out] Received message
37  */
38 TEE_Result mu_receive_msg(vaddr_t base, unsigned int index, uint32_t *msg);
39 #endif /* __DRIVERS_IMX_MU_H */
40