3333
3434/* Includes ------------------------------------------------------------------*/
3535#include "virtio_config.h"
36- #include " openamp/open_amp.h"
36+ #include < openamp/open_amp.h>
3737#include "stm32_def.h"
3838#include "openamp_conf.h"
39+ #include "mbox_ipcc.h"
3940#include "core_debug.h"
4041
4142/* Private define ------------------------------------------------------------*/
@@ -103,6 +104,7 @@ int MAILBOX_Poll(struct virtio_device *vdev, uint32_t vring_id)
103104 switch (vring_id ) {
104105 case VRING0_ID :
105106 if (msg_received_ch1 == RX_BUF_FREE ) {
107+ core_debug ("Running vring0 (ch_1 buf free)\n" );
106108 /* This calls rpmsg_virtio_tx_callback(), which actually does nothing. */
107109 rproc_virtio_notified (vdev , VRING0_ID );
108110 msg_received_ch1 = RX_NO_MSG ;
@@ -111,6 +113,7 @@ int MAILBOX_Poll(struct virtio_device *vdev, uint32_t vring_id)
111113 break ;
112114 case VRING1_ID :
113115 if (msg_received_ch2 == RX_NEW_MSG ) {
116+ core_debug ("Running vring1 (ch_2 new msg)\n" );
114117 /**
115118 * This calls rpmsg_virtio_rx_callback(), which calls virt_uart rx callback
116119 * RING_NUM_BUFFS times at maximum.
@@ -139,8 +142,8 @@ int MAILBOX_Poll(struct virtio_device *vdev, uint32_t vring_id)
139142 */
140143int MAILBOX_Notify (void * priv , uint32_t vring_id )
141144{
142- uint32_t channel ;
143145 (void )priv ;
146+ uint32_t channel ;
144147
145148 /* Called after virtqueue processing: time to inform the remote */
146149 if (vring_id == VRING0_ID ) {
@@ -170,6 +173,7 @@ int MAILBOX_Notify(void *priv, uint32_t vring_id)
170173void IPCC_channel1_callback (IPCC_HandleTypeDef * hipcc ,
171174 uint32_t ChannelIndex , IPCC_CHANNELDirTypeDef ChannelDir )
172175{
176+ (void ) ChannelDir ;
173177 msg_received_ch1 = RX_BUF_FREE ;
174178
175179 /* Inform A7 that we have received the 'buff free' msg */
@@ -180,6 +184,7 @@ void IPCC_channel1_callback(IPCC_HandleTypeDef *hipcc,
180184void IPCC_channel2_callback (IPCC_HandleTypeDef * hipcc ,
181185 uint32_t ChannelIndex , IPCC_CHANNELDirTypeDef ChannelDir )
182186{
187+ (void ) ChannelDir ;
183188 msg_received_ch2 = RX_NEW_MSG ;
184189
185190 /* Don't inform A7 here */
0 commit comments