12 #include <linux/module.h>
18 #define MAILBOX_ARM2DSP1 0x00
19 #define MAILBOX_ARM2DSP1b 0x04
20 #define MAILBOX_DSP2ARM1 0x08
21 #define MAILBOX_DSP2ARM1b 0x0c
22 #define MAILBOX_DSP2ARM2 0x10
23 #define MAILBOX_DSP2ARM2b 0x14
24 #define MAILBOX_ARM2DSP1_Flag 0x18
25 #define MAILBOX_DSP2ARM1_Flag 0x1c
26 #define MAILBOX_DSP2ARM2_Flag 0x20
41 static inline int mbox_read_reg(
size_t ofs)
46 static inline void mbox_write_reg(
u32 val,
size_t ofs)
58 msg = mbox_read_reg(fifo->
data);
70 mbox_write_reg(msg & 0xffff, fifo->
data);
71 mbox_write_reg(msg >> 16, fifo->
cmd);
74 static int omap1_mbox_fifo_empty(
struct omap_mbox *mbox)
79 static int omap1_mbox_fifo_full(
struct omap_mbox *mbox)
84 return mbox_read_reg(fifo->
flag);
112 .fifo_read = omap1_mbox_fifo_read,
113 .fifo_write = omap1_mbox_fifo_write,
114 .fifo_empty = omap1_mbox_fifo_empty,
115 .fifo_full = omap1_mbox_fifo_full,
116 .enable_irq = omap1_mbox_enable_irq,
117 .disable_irq = omap1_mbox_disable_irq,
118 .is_irq = omap1_mbox_is_irq,
137 static struct omap_mbox mbox_dsp_info = {
139 .ops = &omap1_mbox_ops,
140 .priv = &omap1_mbox_dsp_priv,
143 static struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info,
NULL };
176 .probe = omap1_mbox_probe,
179 .name =
"omap-mailbox",
183 static int __init omap1_mbox_init(
void)
188 static void __exit omap1_mbox_exit(
void)