staging: tidspbridge: replace mbox callback with notifier_call
Lately, mailbox callbacks have been replaced by notifier block call chains, this needs to be changed in the users of mailbox, otherwise compilation will break due to missing parameters. For this new change to work, io_mbox_msg needs to be compatible with the notifier_call definition. Reported-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
d1ce318496
Коммит
85d139c977
|
@ -949,7 +949,7 @@ func_end:
|
||||||
* Calls the Bridge's CHNL_ISR to determine if this interrupt is ours, then
|
* Calls the Bridge's CHNL_ISR to determine if this interrupt is ours, then
|
||||||
* schedules a DPC to dispatch I/O.
|
* 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 io_mgr *pio_mgr;
|
||||||
struct dev_object *dev_obj;
|
struct dev_object *dev_obj;
|
||||||
|
@ -959,9 +959,9 @@ void io_mbox_msg(u32 msg)
|
||||||
dev_get_io_mgr(dev_obj, &pio_mgr);
|
dev_get_io_mgr(dev_obj, &pio_mgr);
|
||||||
|
|
||||||
if (!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)
|
if (pio_mgr->intr_val & MBX_PM_CLASS)
|
||||||
io_dispatch_pm(pio_mgr);
|
io_dispatch_pm(pio_mgr);
|
||||||
|
|
||||||
|
@ -973,7 +973,7 @@ void io_mbox_msg(u32 msg)
|
||||||
spin_unlock_irqrestore(&pio_mgr->dpc_lock, flags);
|
spin_unlock_irqrestore(&pio_mgr->dpc_lock, flags);
|
||||||
tasklet_schedule(&pio_mgr->dpc_tasklet);
|
tasklet_schedule(&pio_mgr->dpc_tasklet);
|
||||||
}
|
}
|
||||||
return;
|
return NOTIFY_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -223,6 +223,10 @@ static struct bridge_drv_interface drv_interface_fxns = {
|
||||||
bridge_msg_set_queue_id,
|
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)
|
static inline void flush_all(struct bridge_dev_context *dev_context)
|
||||||
{
|
{
|
||||||
if (dev_context->dw_brd_state == BRD_DSP_HIBERNATION ||
|
if (dev_context->dw_brd_state == BRD_DSP_HIBERNATION ||
|
||||||
|
@ -553,7 +557,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
|
||||||
* Enable Mailbox events and also drain any pending
|
* Enable Mailbox events and also drain any pending
|
||||||
* stale messages.
|
* 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)) {
|
if (IS_ERR(dev_context->mbox)) {
|
||||||
dev_context->mbox = NULL;
|
dev_context->mbox = NULL;
|
||||||
pr_err("%s: Failed to get dsp mailbox handle\n",
|
pr_err("%s: Failed to get dsp mailbox handle\n",
|
||||||
|
@ -563,8 +567,6 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!status) {
|
if (!status) {
|
||||||
dev_context->mbox->rxq->callback = (int (*)(void *))io_mbox_msg;
|
|
||||||
|
|
||||||
/*PM_IVA2GRPSEL_PER = 0xC0;*/
|
/*PM_IVA2GRPSEL_PER = 0xC0;*/
|
||||||
temp = readl(resources->dw_per_pm_base + 0xA8);
|
temp = readl(resources->dw_per_pm_base + 0xA8);
|
||||||
temp = (temp & 0xFFFFFF30) | 0xC0;
|
temp = (temp & 0xFFFFFF30) | 0xC0;
|
||||||
|
@ -685,7 +687,7 @@ static int bridge_brd_stop(struct bridge_dev_context *dev_ctxt)
|
||||||
/* Disable the mailbox interrupts */
|
/* Disable the mailbox interrupts */
|
||||||
if (dev_context->mbox) {
|
if (dev_context->mbox) {
|
||||||
omap_mbox_disable_irq(dev_context->mbox, IRQ_RX);
|
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;
|
dev_context->mbox = NULL;
|
||||||
}
|
}
|
||||||
/* Reset IVA2 clocks*/
|
/* Reset IVA2 clocks*/
|
||||||
|
|
|
@ -72,22 +72,17 @@ extern void io_dpc(unsigned long ref_data);
|
||||||
/*
|
/*
|
||||||
* ======== io_mbox_msg ========
|
* ======== io_mbox_msg ========
|
||||||
* Purpose:
|
* Purpose:
|
||||||
* Main interrupt handler for the shared memory Bridge channel manager.
|
* Main message handler for the shared memory Bridge channel manager.
|
||||||
* Calls the Bridge's chnlsm_isr to determine if this interrupt is ours,
|
* Determine if this message is ours, then schedules a DPC to
|
||||||
* then schedules a DPC to dispatch I/O.
|
* dispatch I/O.
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* ref_data: Pointer to the channel manager object for this board.
|
* self: Pointer to its own notifier_block struct.
|
||||||
* Set in an initial call to ISR_Install().
|
* len: Length of message.
|
||||||
|
* msg: Message code received.
|
||||||
* Returns:
|
* Returns:
|
||||||
* TRUE if interrupt handled; FALSE otherwise.
|
* NOTIFY_OK if handled; NOTIFY_BAD 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:
|
|
||||||
*/
|
*/
|
||||||
void io_mbox_msg(u32 msg);
|
int io_mbox_msg(struct notifier_block *self, unsigned long len, void *msg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ======== io_request_chnl ========
|
* ======== io_request_chnl ========
|
||||||
|
|
Загрузка…
Ссылка в новой задаче