From patchwork Fri Jun 11 15:51:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 105610 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5BFqWUn023726 for ; Fri, 11 Jun 2010 15:52:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757641Ab0FKPwb (ORCPT ); Fri, 11 Jun 2010 11:52:31 -0400 Received: from mail-yw0-f204.google.com ([209.85.211.204]:59033 "EHLO mail-yw0-f204.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757565Ab0FKPwa (ORCPT ); Fri, 11 Jun 2010 11:52:30 -0400 Received: by ywh42 with SMTP id 42so1257641ywh.15 for ; Fri, 11 Jun 2010 08:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=pwNeZOmdJLbiWP2tL2sep9EufUcqw/sX3s/E3nTzOps=; b=pTIUcoRE5aj6KYpIt0Eu2pG81/i+x677dEV/thKQlL+3RV6nQ3jvRHc+mzdtHm1box VSCnmNBeY0Af9XrpmlgL9f5Tk2GAaVdYTLU5qhy4WsqOA2wYgr1rNdd9apgLc1GuNXK2 2nCXaidygT29vq1NW30eA8cbOOfCC4ehAuy3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=vjgvnotnpq+33+6zPeYrLmziEaBPeBtKMMXFsAMNuTZw7Kg1AIzube8k95s+ryGsWs 7kiM7Zv/81AGM7rfsaGIYSXg+Zci4pib7UuXFn1I9JS+A8zd4mREGoR9XflvCe9HxciG ctIdO1LTf6YBG+c82rfPL1YLL2JV2uU1AVZvs= Received: by 10.216.87.18 with SMTP id x18mr2165904wee.88.1276271546090; Fri, 11 Jun 2010 08:52:26 -0700 (PDT) Received: from localhost ([192.100.124.156]) by mx.google.com with ESMTPS id v59sm609283wec.27.2010.06.11.08.52.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 11 Jun 2010 08:52:25 -0700 (PDT) From: Felipe Contreras To: linux-omap Cc: linux-arm , Hiroshi Doyu , Tony Lindgren , Russell King , Felipe Contreras Subject: [PATCH v4 03/14] omap: mailbox: reorganize structures Date: Fri, 11 Jun 2010 18:51:38 +0300 Message-Id: <1276271509-11983-4-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1276271509-11983-1-git-send-email-felipe.contreras@gmail.com> References: <1276271509-11983-1-git-send-email-felipe.contreras@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 11 Jun 2010 15:52:33 +0000 (UTC) diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 8c1070c..edcfec6 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -283,6 +283,7 @@ static struct omap_mbox_ops omap2_mbox_ops = { */ /* FIXME: the following structs should be filled automatically by the user id */ + /* DSP */ static struct omap_mbox2_priv omap2_mbox_dsp_priv = { .tx_fifo = { @@ -300,8 +301,40 @@ static struct omap_mbox2_priv omap2_mbox_dsp_priv = { .irqdisable = MAILBOX_IRQENABLE(0), }; -/* OMAP4 specific data structure. Use the cpu_is_omap4xxx() -to use this*/ +struct omap_mbox mbox_dsp_info = { + .name = "dsp", + .ops = &omap2_mbox_ops, + .priv = &omap2_mbox_dsp_priv, +}; +EXPORT_SYMBOL(mbox_dsp_info); + +#if defined(CONFIG_ARCH_OMAP2420) + +/* IVA */ +static struct omap_mbox2_priv omap2_mbox_iva_priv = { + .tx_fifo = { + .msg = MAILBOX_MESSAGE(2), + .fifo_stat = MAILBOX_FIFOSTATUS(2), + }, + .rx_fifo = { + .msg = MAILBOX_MESSAGE(3), + .msg_stat = MAILBOX_MSGSTATUS(3), + }, + .irqenable = MAILBOX_IRQENABLE(3), + .irqstatus = MAILBOX_IRQSTATUS(3), + .notfull_bit = MAILBOX_IRQ_NOTFULL(2), + .newmsg_bit = MAILBOX_IRQ_NEWMSG(3), + .irqdisable = MAILBOX_IRQENABLE(3), +}; + +static struct omap_mbox mbox_iva_info = { + .name = "iva", + .ops = &omap2_mbox_ops, + .priv = &omap2_mbox_iva_priv, +}; +#endif + +/* OMAP4 */ static struct omap_mbox2_priv omap2_mbox_1_priv = { .tx_fifo = { .msg = MAILBOX_MESSAGE(0), @@ -325,13 +358,6 @@ struct omap_mbox mbox_1_info = { }; EXPORT_SYMBOL(mbox_1_info); -struct omap_mbox mbox_dsp_info = { - .name = "dsp", - .ops = &omap2_mbox_ops, - .priv = &omap2_mbox_dsp_priv, -}; -EXPORT_SYMBOL(mbox_dsp_info); - static struct omap_mbox2_priv omap2_mbox_2_priv = { .tx_fifo = { .msg = MAILBOX_MESSAGE(3), @@ -355,30 +381,6 @@ struct omap_mbox mbox_2_info = { }; EXPORT_SYMBOL(mbox_2_info); -#if defined(CONFIG_ARCH_OMAP2420) /* IVA */ -static struct omap_mbox2_priv omap2_mbox_iva_priv = { - .tx_fifo = { - .msg = MAILBOX_MESSAGE(2), - .fifo_stat = MAILBOX_FIFOSTATUS(2), - }, - .rx_fifo = { - .msg = MAILBOX_MESSAGE(3), - .msg_stat = MAILBOX_MSGSTATUS(3), - }, - .irqenable = MAILBOX_IRQENABLE(3), - .irqstatus = MAILBOX_IRQSTATUS(3), - .notfull_bit = MAILBOX_IRQ_NOTFULL(2), - .newmsg_bit = MAILBOX_IRQ_NEWMSG(3), - .irqdisable = MAILBOX_IRQENABLE(3), -}; - -static struct omap_mbox mbox_iva_info = { - .name = "iva", - .ops = &omap2_mbox_ops, - .priv = &omap2_mbox_iva_priv, -}; -#endif - static int __devinit omap2_mbox_probe(struct platform_device *pdev) { struct resource *res;