2121
2222/*
2323 * Channel direction and usage:
24- * virtio_rpmsg_bus.c rpmsg_virtio.c
25- * ======== <-- new msg ---=============--------<------ =======
26- * || || rvq (rx) || CHANNEL 1 || svq (tx_vq) || ||
27- * || A7 || ------->-------=============--- buf free--> || M4 ||
28- * || || || ||
29- * ||master|| <-- buf free---=============--------<------ || slave||
30- * || || svq (tx) || CHANNEL 2 || rvq (rx_vq) || ||
31- * ======== ------->-------=============----new msg --> =======
24+ virtio_rpmsg_bus.c virtqueue vring rpmsg_virtio.c
25+ ======== <-- new msg ---=============--------<------ === =======
26+ || || rvq (rx) || IPCC CHANNEL 1 || svq (tx_vq) -> vring0 || ||
27+ || A7 || ------->-------=============--- buf free--> || M4 ||
28+ || || || ||
29+ ||master|| <-- buf free---=============--------<------ || slave ||
30+ || || svq (tx) || IPCC CHANNEL 2 || rvq (rx_vq) -> vring1 ||(remote) ||
31+ ======== ------->-------=============----new msg --> === =======
3232 */
3333
3434/* Includes ------------------------------------------------------------------*/
@@ -158,12 +158,12 @@ int MAILBOX_Notify(void *priv, uint32_t vring_id)
158158
159159 /* Check that the channel is free (otherwise wait until it is) */
160160 if (HAL_IPCC_GetChannelStatus (& hipcc , channel , IPCC_CHANNEL_DIR_TX ) == IPCC_CHANNEL_STATUS_OCCUPIED ) {
161- // Wait for channel to be freed
161+ /* Wait for channel to be freed */
162162 while (HAL_IPCC_GetChannelStatus (& hipcc , channel , IPCC_CHANNEL_DIR_TX ) == IPCC_CHANNEL_STATUS_OCCUPIED )
163163 ;
164164 }
165165
166- /* Inform A7 (either new message, or buf free) */
166+ /* Inform the host processor (either new message, or buf free) */
167167 HAL_IPCC_NotifyCPU (& hipcc , channel , IPCC_CHANNEL_DIR_TX );
168168 return 0 ;
169169}
@@ -176,7 +176,7 @@ void IPCC_channel1_callback(IPCC_HandleTypeDef *hipcc,
176176 (void ) ChannelDir ;
177177 msg_received_ch1 = RX_BUF_FREE ;
178178
179- /* Inform A7 that we have received the 'buff free' msg */
179+ /* Inform the host processor that we have received the 'buff free' msg */
180180 HAL_IPCC_NotifyCPU (hipcc , ChannelIndex , IPCC_CHANNEL_DIR_RX );
181181}
182182
@@ -187,7 +187,7 @@ void IPCC_channel2_callback(IPCC_HandleTypeDef *hipcc,
187187 (void ) ChannelDir ;
188188 msg_received_ch2 = RX_NEW_MSG ;
189189
190- /* Don't inform A7 here */
190+ /* Inform the host processor that we have received the msg */
191191 HAL_IPCC_NotifyCPU (hipcc , ChannelIndex , IPCC_CHANNEL_DIR_RX );
192192}
193193
0 commit comments