예제 #1
0
static void omap2_mbox_restore_ctx(struct omap_mbox *mbox)
{
	int i, j;

	omap2_mbox_startup(mbox);

	/* Restore irqs per user */
	for (j = 0, i = 0; j < nr_mbox_users; i++, j++) {
		if (cpu_is_omap44xx())
			mbox_write_reg(mbox_ctx[i], OMAP4_MAILBOX_IRQENABLE(j));
		else
			mbox_write_reg(mbox_ctx[i], MAILBOX_IRQENABLE(j));

		dev_dbg(mbox->dev, "%s: [%02x] %08x\n", __func__,
				i, mbox_ctx[i]);
	}
}
예제 #2
0
static void omap2_mbox_save_ctx(struct omap_mbox *mbox)
{
	int i, j;

	/* Save irqs per user */
	for (j = 0, i = 0; j < nr_mbox_users; i++, j++) {
		if (cpu_is_omap44xx())
			mbox_ctx[i] = mbox_read_reg(OMAP4_MAILBOX_IRQENABLE(j));
		else
			mbox_ctx[i] = mbox_read_reg(MAILBOX_IRQENABLE(j));

		dev_dbg(mbox->dev, "%s: [%02x] %08x\n", __func__,
			i, mbox_ctx[i]);
	}

//	omap2_mbox_shutdown(mbox);
}
};



/* OMAP4 specific data structure. Use the cpu_is_omap4xxx()
to use this*/
static struct omap_mbox2_priv omap2_mbox_1_priv = {
	.tx_fifo = {
		.msg		= MAILBOX_MESSAGE(0),
		.fifo_stat	= MAILBOX_FIFOSTATUS(0),
	},
	.rx_fifo = {
		.msg		= MAILBOX_MESSAGE(1),
		.msg_stat	= MAILBOX_MSGSTATUS(1),
	},
	.irqenable	= OMAP4_MAILBOX_IRQENABLE(0),
	.irqstatus	= OMAP4_MAILBOX_IRQSTATUS(0),
	.notfull_bit	= MAILBOX_IRQ_NOTFULL(0),
	.newmsg_bit	= MAILBOX_IRQ_NEWMSG(1),
	.irqdisable	= OMAP4_MAILBOX_IRQENABLE_CLR(0),
};

struct omap_mbox mbox_1_info = {
	.name	= "mailbox-1",
	.ops	= &omap2_mbox_ops,
	.priv	= &omap2_mbox_1_priv,
};
EXPORT_SYMBOL(mbox_1_info);

struct omap_mbox mbox_dsp_info = {
	.name	= "dsp",