blob: 8aa984ec1f38b8f57d00cbd82a3cfa3d4018104c [file] [log] [blame]
Suman Anna2ad51572018-07-11 18:42:11 -05001/* SPDX-License-Identifier: GPL-2.0 */
Suman Annac869c752013-03-12 17:55:29 -05002/*
3 * omap-mailbox: interprocessor communication module for OMAP
Suman Annac869c752013-03-12 17:55:29 -05004 */
5
6#ifndef OMAP_MAILBOX_H
7#define OMAP_MAILBOX_H
8
Suman Anna9c1f2a52019-06-04 12:01:46 -05009typedef uintptr_t mbox_msg_t;
10
11#define omap_mbox_message(data) (u32)(mbox_msg_t)(data)
Suman Annac869c752013-03-12 17:55:29 -050012
13typedef int __bitwise omap_mbox_irq_t;
14#define IRQ_TX ((__force omap_mbox_irq_t) 1)
15#define IRQ_RX ((__force omap_mbox_irq_t) 2)
16
Suman Anna8841a662014-11-03 17:05:50 -060017struct mbox_chan;
18struct mbox_client;
Suman Annac869c752013-03-12 17:55:29 -050019
Suman Anna8841a662014-11-03 17:05:50 -060020struct mbox_chan *omap_mbox_request_channel(struct mbox_client *cl,
21 const char *chan_name);
Suman Annac869c752013-03-12 17:55:29 -050022
Suman Anna8841a662014-11-03 17:05:50 -060023void omap_mbox_enable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq);
24void omap_mbox_disable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq);
Suman Annac869c752013-03-12 17:55:29 -050025
26#endif /* OMAP_MAILBOX_H */