@@ -80,13 +80,13 @@ int MAILBOX_Init(void)
80
80
81
81
if (HAL_IPCC_ActivateNotification (& hipcc , IPCC_CHANNEL_1 , IPCC_CHANNEL_DIR_RX ,
82
82
IPCC_channel1_callback ) != HAL_OK ) {
83
- OPENAMP_log_err ( "%s: ch_1 RX fail\n" , __func__ );
83
+ Error_Handler ( );
84
84
return -1 ;
85
85
}
86
86
87
87
if (HAL_IPCC_ActivateNotification (& hipcc , IPCC_CHANNEL_2 , IPCC_CHANNEL_DIR_RX ,
88
88
IPCC_channel2_callback ) != HAL_OK ) {
89
- OPENAMP_log_err ( "%s: ch_2 RX fail\n" , __func__ );
89
+ Error_Handler ( );
90
90
return -1 ;
91
91
}
92
92
@@ -106,27 +106,23 @@ int MAILBOX_Notify(void *priv, uint32_t id)
106
106
/* Called after virtqueue processing: time to inform the remote */
107
107
if (id == VRING0_ID ) {
108
108
channel = IPCC_CHANNEL_1 ;
109
- OPENAMP_log_dbg ("Send msg on ch_1\r\n" );
110
109
} else if (id == VRING1_ID ) {
111
110
/* Note: the OpenAMP framework never notifies this */
112
111
channel = IPCC_CHANNEL_2 ;
113
- OPENAMP_log_dbg ("Send 'buff free' on ch_2\r\n" );
114
112
return -1 ;
115
113
} else {
116
- OPENAMP_log_err ("invalid vring (%d)\r\n" , (int )id );
117
114
return -1 ;
118
115
}
119
116
120
117
/* Check that the channel is free (otherwise wait until it is) */
121
118
if (HAL_IPCC_GetChannelStatus (& hipcc , channel , IPCC_CHANNEL_DIR_TX ) == IPCC_CHANNEL_STATUS_OCCUPIED ) {
122
- OPENAMP_log_dbg ( "Waiting for channel to be freed\r\n" );
119
+ // Wait for channel to be freed
123
120
while (HAL_IPCC_GetChannelStatus (& hipcc , channel , IPCC_CHANNEL_DIR_TX ) == IPCC_CHANNEL_STATUS_OCCUPIED )
124
121
;
125
122
}
126
123
127
124
/* Inform A7 (either new message, or buf free) */
128
125
HAL_IPCC_NotifyCPU (& hipcc , channel , IPCC_CHANNEL_DIR_TX );
129
-
130
126
return 0 ;
131
127
}
132
128
0 commit comments