/*! * ======== InterruptM3_intSend ======== * Send interrupt to the remote processor */ Void InterruptM3_intSend(UInt16 remoteProcId, UArg arg) { Log_print2(Diags_USER1, "InterruptM3_intSend: Sending interrupt with payload 0x%x to proc #%d", (IArg)arg, (IArg)remoteProcId); if (remoteProcId == sysm3ProcId) { while(REG32(MAILBOX_FIFOSTATUS(SYSM3_MBX))); REG32(MAILBOX_MESSAGE(SYSM3_MBX)) = arg; } else if (remoteProcId == appm3ProcId) { while(REG32(MAILBOX_FIFOSTATUS(APPM3_MBX))); /* Write to the mailbox, but this won't trigger an interrupt */ REG32(MAILBOX_MESSAGE(APPM3_MBX)) = arg; /* Actually trigger the interrupt */ REG16(INTERRUPT_CORE_1) |= 0x1; } else if (remoteProcId == dspProcId) { while(REG32(MAILBOX_FIFOSTATUS(DSP_MBX))); REG32(MAILBOX_MESSAGE(DSP_MBX)) = arg; } else if (remoteProcId == hostProcId) { while(REG32(MAILBOX_FIFOSTATUS(HOST_MBX))); REG32(MAILBOX_MESSAGE(HOST_MBX)) = arg; } else { /* Should never get here */ Assert_isTrue(FALSE, NULL); } }
/* * MAILBOX 0: ARM -> DSP, * MAILBOX 1: ARM <- DSP. * MAILBOX 2: ARM -> IVA, * MAILBOX 3: ARM <- IVA. * MAILBOX 4: ARM -> wrigley c55, * MAILBOX 5: ARM <- wrigley c55, */ /* FIXME: the following structs should be filled automatically by the user id */ /* DSP */ static struct omap_mbox2_priv omap2_mbox_dsp_priv = { .tx_fifo = { .msg = MAILBOX_MESSAGE(0), .fifo_stat = MAILBOX_FIFOSTATUS(0), }, .rx_fifo = { .msg = MAILBOX_MESSAGE(1), .msg_stat = MAILBOX_MSGSTATUS(1), }, .irqenable = MAILBOX_IRQENABLE(0), .irqstatus = MAILBOX_IRQSTATUS(0), .notfull_bit = MAILBOX_IRQ_NOTFULL(0), .newmsg_bit = MAILBOX_IRQ_NEWMSG(1), .irqdisable = MAILBOX_IRQENABLE(0), }; /* OMAP4 specific data structure. Use the cpu_is_omap4xxx()
static inline unsigned int fifo_full(void __iomem *mbox_base, int mbox_id) { return __raw_readl(mbox_base + MAILBOX_FIFOSTATUS(mbox_id)) & 0x1; }
/*! * ======== InterruptIpu_intSend ======== * Send interrupt to the remote processor */ Void InterruptIpu_intSend(UInt arg) { while(REG32(MAILBOX_FIFOSTATUS(M3_TO_HOST_MBX))); REG32(MAILBOX_MESSAGE(M3_TO_HOST_MBX)) = arg; }