#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/kfifo.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/mailbox_controller.h>
#include <linux/mailbox_client.h>
#include "mailbox.h"
#define MAILBOX_REVISION …
#define MAILBOX_MESSAGE(m) …
#define MAILBOX_FIFOSTATUS(m) …
#define MAILBOX_MSGSTATUS(m) …
#define OMAP2_MAILBOX_IRQSTATUS(u) …
#define OMAP2_MAILBOX_IRQENABLE(u) …
#define OMAP4_MAILBOX_IRQSTATUS(u) …
#define OMAP4_MAILBOX_IRQENABLE(u) …
#define OMAP4_MAILBOX_IRQENABLE_CLR(u) …
#define MAILBOX_IRQSTATUS(type, u) …
#define MAILBOX_IRQENABLE(type, u) …
#define MAILBOX_IRQDISABLE(type, u) …
#define MAILBOX_IRQ_NEWMSG(m) …
#define MAILBOX_IRQ_NOTFULL(m) …
#define MBOX_INTR_CFG_TYPE1 …
#define MBOX_INTR_CFG_TYPE2 …
omap_mbox_irq_t;
struct omap_mbox_fifo { … };
struct omap_mbox_match_data { … };
struct omap_mbox_device { … };
struct omap_mbox { … };
static inline
unsigned int mbox_read_reg(struct omap_mbox_device *mdev, size_t ofs)
{ … }
static inline
void mbox_write_reg(struct omap_mbox_device *mdev, u32 val, size_t ofs)
{ … }
static u32 mbox_fifo_read(struct omap_mbox *mbox)
{ … }
static void mbox_fifo_write(struct omap_mbox *mbox, u32 msg)
{ … }
static int mbox_fifo_empty(struct omap_mbox *mbox)
{ … }
static int mbox_fifo_full(struct omap_mbox *mbox)
{ … }
static void ack_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
{ … }
static int is_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
{ … }
static void omap_mbox_enable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
{ … }
static void omap_mbox_disable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
{ … }
static void __mbox_tx_interrupt(struct omap_mbox *mbox)
{ … }
static void __mbox_rx_interrupt(struct omap_mbox *mbox)
{ … }
static irqreturn_t mbox_interrupt(int irq, void *p)
{ … }
static int omap_mbox_startup(struct omap_mbox *mbox)
{ … }
static void omap_mbox_fini(struct omap_mbox *mbox)
{ … }
static int omap_mbox_chan_startup(struct mbox_chan *chan)
{ … }
static void omap_mbox_chan_shutdown(struct mbox_chan *chan)
{ … }
static int omap_mbox_chan_send_noirq(struct omap_mbox *mbox, u32 msg)
{ … }
static int omap_mbox_chan_send(struct omap_mbox *mbox, u32 msg)
{ … }
static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data)
{ … }
static const struct mbox_chan_ops omap_mbox_chan_ops = …;
#ifdef CONFIG_PM_SLEEP
static int omap_mbox_suspend(struct device *dev)
{ … }
static int omap_mbox_resume(struct device *dev)
{ … }
#endif
static const struct dev_pm_ops omap_mbox_pm_ops = …;
static const struct omap_mbox_match_data omap2_data = …;
static const struct omap_mbox_match_data omap4_data = …;
static const struct of_device_id omap_mailbox_of_match[] = …;
MODULE_DEVICE_TABLE(of, omap_mailbox_of_match);
static struct mbox_chan *omap_mbox_of_xlate(struct mbox_controller *controller,
const struct of_phandle_args *sp)
{ … }
static int omap_mbox_probe(struct platform_device *pdev)
{ … }
static struct platform_driver omap_mbox_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;