Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232603
b: refs/heads/master
c: 85d139c
h: refs/heads/master
i:
  232601: d9eb35d
  232599: 05a6a0f
v: v3
  • Loading branch information
Omar Ramirez Luna authored and Greg Kroah-Hartman committed Jan 20, 2011
1 parent ec0295e commit 6ed9c9e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1ce318496f5943d2cc5e20171fc383a59a1421f
refs/heads/master: 85d139c977dd13cd1ca5cb3b9d8e39cb477eaf0c
8 changes: 4 additions & 4 deletions trunk/drivers/staging/tidspbridge/core/io_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ void io_dpc(unsigned long ref_data)
* Calls the Bridge's CHNL_ISR to determine if this interrupt is ours, then
* schedules a DPC to dispatch I/O.
*/
void io_mbox_msg(u32 msg)
int io_mbox_msg(struct notifier_block *self, unsigned long len, void *msg)
{
struct io_mgr *pio_mgr;
struct dev_object *dev_obj;
Expand All @@ -959,9 +959,9 @@ void io_mbox_msg(u32 msg)
dev_get_io_mgr(dev_obj, &pio_mgr);

if (!pio_mgr)
return;
return NOTIFY_BAD;

pio_mgr->intr_val = (u16)msg;
pio_mgr->intr_val = (u16)((u32)msg);
if (pio_mgr->intr_val & MBX_PM_CLASS)
io_dispatch_pm(pio_mgr);

Expand All @@ -973,7 +973,7 @@ void io_mbox_msg(u32 msg)
spin_unlock_irqrestore(&pio_mgr->dpc_lock, flags);
tasklet_schedule(&pio_mgr->dpc_tasklet);
}
return;
return NOTIFY_OK;
}

/*
Expand Down
10 changes: 6 additions & 4 deletions trunk/drivers/staging/tidspbridge/core/tiomap3430.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ static struct bridge_drv_interface drv_interface_fxns = {
bridge_msg_set_queue_id,
};

static struct notifier_block dsp_mbox_notifier = {
.notifier_call = io_mbox_msg,
};

static inline void flush_all(struct bridge_dev_context *dev_context)
{
if (dev_context->dw_brd_state == BRD_DSP_HIBERNATION ||
Expand Down Expand Up @@ -553,7 +557,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
* Enable Mailbox events and also drain any pending
* stale messages.
*/
dev_context->mbox = omap_mbox_get("dsp");
dev_context->mbox = omap_mbox_get("dsp", &dsp_mbox_notifier);
if (IS_ERR(dev_context->mbox)) {
dev_context->mbox = NULL;
pr_err("%s: Failed to get dsp mailbox handle\n",
Expand All @@ -563,8 +567,6 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,

}
if (!status) {
dev_context->mbox->rxq->callback = (int (*)(void *))io_mbox_msg;

/*PM_IVA2GRPSEL_PER = 0xC0;*/
temp = readl(resources->dw_per_pm_base + 0xA8);
temp = (temp & 0xFFFFFF30) | 0xC0;
Expand Down Expand Up @@ -685,7 +687,7 @@ static int bridge_brd_stop(struct bridge_dev_context *dev_ctxt)
/* Disable the mailbox interrupts */
if (dev_context->mbox) {
omap_mbox_disable_irq(dev_context->mbox, IRQ_RX);
omap_mbox_put(dev_context->mbox);
omap_mbox_put(dev_context->mbox, &dsp_mbox_notifier);
dev_context->mbox = NULL;
}
/* Reset IVA2 clocks*/
Expand Down
21 changes: 8 additions & 13 deletions trunk/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,17 @@ extern void io_dpc(unsigned long ref_data);
/*
* ======== io_mbox_msg ========
* Purpose:
* Main interrupt handler for the shared memory Bridge channel manager.
* Calls the Bridge's chnlsm_isr to determine if this interrupt is ours,
* then schedules a DPC to dispatch I/O.
* Main message handler for the shared memory Bridge channel manager.
* Determine if this message is ours, then schedules a DPC to
* dispatch I/O.
* Parameters:
* ref_data: Pointer to the channel manager object for this board.
* Set in an initial call to ISR_Install().
* self: Pointer to its own notifier_block struct.
* len: Length of message.
* msg: Message code received.
* Returns:
* TRUE if interrupt handled; FALSE otherwise.
* Requires:
* Must be in locked memory if executing in kernel mode.
* Must only call functions which are in locked memory if Kernel mode.
* Must only call asynchronous services.
* Interrupts are disabled and EOI for this interrupt has been sent.
* Ensures:
* NOTIFY_OK if handled; NOTIFY_BAD otherwise.
*/
void io_mbox_msg(u32 msg);
int io_mbox_msg(struct notifier_block *self, unsigned long len, void *msg);

/*
* ======== io_request_chnl ========
Expand Down

0 comments on commit 6ed9c9e

Please sign in to comment.