1 #ifndef __MESSAGEBOX__H__ 2 #define __MESSAGEBOX__H__ 3 4 #include <stdint.h> 5 6 enum cpu_type { 7 ARM_MSG_CORE, 8 RISC_V_MSG_CORE, 9 MIPS_MSG_CORE, 10 OPENRISC_MSG_CORE, 11 DSP0_MSG_CORE, 12 DSP1_MSG_CORE, 13 }; 14 15 struct msg_endpoint { 16 uint32_t local_amp; 17 uint32_t remote_amp; 18 uint32_t write_ch; 19 uint32_t read_ch; 20 struct msg_endpoint *next; 21 void *data; 22 void (*rec)(uint32_t l, void *d); 23 void (*tx_done)(void *d); 24 /* use in driver */ 25 void *private; 26 }; 27 28 uint32_t hal_msgbox_init(void); 29 30 uint32_t hal_msgbox_alloc_channel(struct msg_endpoint *edp, uint32_t remote, 31 uint32_t read, uint32_t write); 32 33 uint32_t hal_msgbox_channel_send(struct msg_endpoint *edp, uint8_t *bf, 34 uint32_t len); 35 36 void hal_msgbox_free_channel(struct msg_endpoint *edp); 37 38 #endif /* __MESSAGEBOX__H__ */ 39 40