diff options
Diffstat (limited to 'kernel/ethosu_mailbox.h')
-rw-r--r-- | kernel/ethosu_mailbox.h | 51 |
1 files changed, 5 insertions, 46 deletions
diff --git a/kernel/ethosu_mailbox.h b/kernel/ethosu_mailbox.h index c3f5579..edf922b 100644 --- a/kernel/ethosu_mailbox.h +++ b/kernel/ethosu_mailbox.h @@ -24,7 +24,7 @@ /**************************************************************************** * Includes ****************************************************************************/ -#include "ethosu_core_interface.h" +#include "ethosu_core_rpmsg.h" #include <linux/types.h> #include <linux/mailbox_client.h> @@ -45,17 +45,9 @@ struct resource; typedef void (*ethosu_mailbox_cb)(void *user_arg); struct ethosu_mailbox { - struct device *dev; - struct workqueue_struct *wq; - struct work_struct work; - struct ethosu_core_queue __iomem *in_queue; - struct ethosu_core_queue __iomem *out_queue; - struct mbox_client client; - struct mbox_chan *rx; - struct mbox_chan *tx; - ethosu_mailbox_cb callback; - void *user_arg; - struct idr msg_idr; + struct device *dev; + struct rpmsg_endpoint *ept; + struct idr msg_idr; }; struct ethosu_mailbox_msg { @@ -74,10 +66,7 @@ struct ethosu_mailbox_msg { */ int ethosu_mailbox_init(struct ethosu_mailbox *mbox, struct device *dev, - struct resource *in_queue, - struct resource *out_queue, - ethosu_mailbox_cb callback, - void *user_arg); + struct rpmsg_endpoint *ept); /** * ethosu_mailbox_deinit() - Deinitialize mailbox @@ -85,36 +74,6 @@ int ethosu_mailbox_init(struct ethosu_mailbox *mbox, void ethosu_mailbox_deinit(struct ethosu_mailbox *mbox); /** - * ethosu_mailbox_wait_prepare() - Prepare to wait on firmware - * - * This function must only be called when the firmware is in a - * stopped state. It invalidates the firmware queues setting - * size, read and write positions to illegal values. - */ -void ethosu_mailbox_wait_prepare(struct ethosu_mailbox *mbox); - -/** - * ethosu_mailbox_wait_firmware() - Waiting for firmware to initialize - * message queues - * - * Following a call to ethosu_mailbox_wait_prepare() this function waits for - * the firmware to boot up and initialize the firmware queues. - * - * Return: 0 on success, else error code. - */ -int ethosu_mailbox_wait_firmware(struct ethosu_mailbox *mbox); - -/** - * ethosu_mailbox_read() - Read message from mailbox - * - * Return: 0 message read, else error code. - */ -int ethosu_mailbox_read(struct ethosu_mailbox *mbox, - struct ethosu_core_msg *header, - void *data, - size_t length); - -/** * ethosu_mailbox_register() - Register the ethosu_mailbox_msg in ethosu_mailbox * * Return: 0 on success, else error code. |