Commit 37bab328 authored by Toshihiro Kobayashi's avatar Toshihiro Kobayashi Committed by Tony Lindgren

ARM: OMAP: Fix for mailbox-omap1

Fix for omap1 mailbox driver.
This will enable DSP Gateway again.
Signed-off-by: default avatarToshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
parent 995dda5f
...@@ -67,7 +67,7 @@ static inline void ...@@ -67,7 +67,7 @@ static inline void
omap1_mbox_fifo_write(struct omap_mbox *mbox, mbox_msg_t msg) omap1_mbox_fifo_write(struct omap_mbox *mbox, mbox_msg_t msg)
{ {
struct omap_mbox1_fifo *fifo = struct omap_mbox1_fifo *fifo =
&((struct omap_mbox1_priv *)mbox->priv)->rx_fifo; &((struct omap_mbox1_priv *)mbox->priv)->tx_fifo;
mbox_write_reg(msg & 0xffff, fifo->data); mbox_write_reg(msg & 0xffff, fifo->data);
mbox_write_reg(msg >> 16, fifo->cmd); mbox_write_reg(msg >> 16, fifo->cmd);
...@@ -110,6 +110,7 @@ omap1_mbox_is_irq(struct omap_mbox *mbox, omap_mbox_type_t irq) ...@@ -110,6 +110,7 @@ omap1_mbox_is_irq(struct omap_mbox *mbox, omap_mbox_type_t irq)
} }
struct omap_mbox_ops omap1_mbox_ops = { struct omap_mbox_ops omap1_mbox_ops = {
.type = OMAP_MBOX_TYPE1,
.fifo_read = omap1_mbox_fifo_read, .fifo_read = omap1_mbox_fifo_read,
.fifo_write = omap1_mbox_fifo_write, .fifo_write = omap1_mbox_fifo_write,
.fifo_empty = omap1_mbox_fifo_empty, .fifo_empty = omap1_mbox_fifo_empty,
......
...@@ -114,9 +114,12 @@ static void mbox_msg_receiver(void *p) ...@@ -114,9 +114,12 @@ static void mbox_msg_receiver(void *p)
struct omap_mbox *mbox = (struct omap_mbox *)p; struct omap_mbox *mbox = (struct omap_mbox *)p;
struct omap_mbq *mbq = mbox->mbq; struct omap_mbq *mbq = mbox->mbq;
mbox_msg_t msg; mbox_msg_t msg;
int was_full;
while (!mbq_empty(mbq)) { while (!mbq_empty(mbq)) {
was_full = mbq_full(mbq);
msg = mbq_get(mbq); msg = mbq_get(mbq);
if (was_full) /* now we have a room in the mbq. */
enable_mbox_irq(mbox, IRQ_RX); enable_mbox_irq(mbox, IRQ_RX);
if (unlikely(mbox_seq_test(mbox, msg))) { if (unlikely(mbox_seq_test(mbox, msg))) {
......
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