Commit d2bdd6fc authored by Subramaniam C.A's avatar Subramaniam C.A Committed by Hari Kanigeri

OMAP4 Mailbox driver - Includes Hiroshi's changes on mailbox driver along with...

OMAP4 Mailbox driver - Includes Hiroshi's changes on mailbox driver along with API changes introducted in the 2.6.31 kernel

This patch cleans up the mailbox driver module and adds the
following changes:
	- Remove sequence bit checking (protocol logic not
		required in the driver)
	- Remove class interface (not used presently)
	- Remove disalbe_/enable_mbox_irq in isr (No irqs
		happen in the isr)
	- Remove unnecessary arg for omap_mbox_msg_send
	- Expose omap_mbox_enable()/disable_irq()

NOTE::
For OMAP4 the tx work queue does not ssem to function
properly. Hence, calling __mbox_msg_send for now.
Signed-off-by: default avatarC A Subramaniam <subramaniam.ca@ti.com>
Signed-off-by: default avatarRamesh Gupta G <grgupta@ti.com>
parent 4cd486c1
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <linux/blkdev.h> #include <linux/blkdev.h>
typedef u32 mbox_msg_t; typedef u32 mbox_msg_t;
typedef void (mbox_receiver_t)(mbox_msg_t msg);
struct omap_mbox; struct omap_mbox;
typedef int __bitwise omap_mbox_irq_t; typedef int __bitwise omap_mbox_irq_t;
...@@ -29,8 +28,10 @@ struct omap_mbox_ops { ...@@ -29,8 +28,10 @@ struct omap_mbox_ops {
int (*fifo_empty)(struct omap_mbox *mbox); int (*fifo_empty)(struct omap_mbox *mbox);
int (*fifo_full)(struct omap_mbox *mbox); int (*fifo_full)(struct omap_mbox *mbox);
/* irq */ /* irq */
void (*enable_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); void (*enable_irq)(struct omap_mbox *mbox,
void (*disable_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); omap_mbox_irq_t irq);
void (*disable_irq)(struct omap_mbox *mbox,
omap_mbox_irq_t irq);
void (*ack_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); void (*ack_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
int (*is_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); int (*is_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
/* ctx */ /* ctx */
...@@ -64,7 +65,7 @@ struct omap_mbox { ...@@ -64,7 +65,7 @@ struct omap_mbox {
void (*err_notify)(void); void (*err_notify)(void);
}; };
int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg, void *); int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg);
void omap_mbox_init_seq(struct omap_mbox *); void omap_mbox_init_seq(struct omap_mbox *);
struct omap_mbox *omap_mbox_get(const char *); struct omap_mbox *omap_mbox_get(const char *);
...@@ -93,4 +94,16 @@ static inline void omap_mbox_restore_ctx(struct omap_mbox *mbox) ...@@ -93,4 +94,16 @@ static inline void omap_mbox_restore_ctx(struct omap_mbox *mbox)
mbox->ops->restore_ctx(mbox); mbox->ops->restore_ctx(mbox);
} }
static inline void omap_mbox_enable_irq(struct omap_mbox *mbox,
omap_mbox_irq_t irq)
{
mbox->ops->enable_irq(mbox, irq);
}
static inline void omap_mbox_disable_irq(struct omap_mbox *mbox,
omap_mbox_irq_t irq)
{
mbox->ops->disable_irq(mbox, irq);
}
#endif /* MAILBOX_H */ #endif /* MAILBOX_H */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment