Fix wait for TX buffer blocking receive callback

Currently, the mailbox uses the rpmsg_send function to send messages,
which will block for up to 15 seconds if there is no TX buffer available
for the message. This is an issue because the device mutex is locked
while waiting and the receive callback for messages uses the same mutex
to prevent concurrent access so no received messages can be handled
while waiting for a TX buffer.

To resolve this, the mailbox has been changed to use the rpmsg_trysend
function, which will return directly if there is no TX buffer available,
together with a wait queue. While waiting in the queue to send the
message, the device mutex is released to not block the receive callback
and other users of the mutex.

Change-Id: I34fbfd21167b49fb83744ab2473ab02632a809ee
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
diff --git a/kernel/ethosu_mailbox.h b/kernel/ethosu_mailbox.h
index a3e2c14..c4c71a9 100644
--- a/kernel/ethosu_mailbox.h
+++ b/kernel/ethosu_mailbox.h
@@ -28,7 +28,7 @@
 
 #include <linux/types.h>
 #include <linux/mailbox_client.h>
-#include <linux/workqueue.h>
+#include <linux/wait.h>
 #include <linux/idr.h>
 
 /****************************************************************************
@@ -48,6 +48,8 @@
 	struct device         *dev;
 	struct rpmsg_endpoint *ept;
 	struct idr            msg_idr;
+	atomic_t              done;
+	wait_queue_head_t     send_queue;
 };
 
 /**