mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
mailbox: Support blocking transfers in atomic context
The mailbox framework supports blocking transfers via completions for clients that can sleep. In order to support blocking transfers in cases where the transmission is not permitted to sleep, add a new ->flush() callback that controller drivers can implement to busy loop until the transmission has been completed. A new mbox_flush() function can be called by mailbox consumers in atomic context to make sure a transfer has completed. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
parent
2298a6f09f
commit
a8803d7421
3 changed files with 33 additions and 0 deletions
|
@ -44,6 +44,7 @@ struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl,
|
|||
const char *name);
|
||||
struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index);
|
||||
int mbox_send_message(struct mbox_chan *chan, void *mssg);
|
||||
int mbox_flush(struct mbox_chan *chan, unsigned long timeout);
|
||||
void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
|
||||
bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
|
||||
void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue