From patchwork Sun May 2 23:59:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 96392 X-Patchwork-Delegate: hiroshi.doyu@nokia.com 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 o4300JL1005691 for ; Mon, 3 May 2010 00:00:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753487Ab0ECAAW (ORCPT ); Sun, 2 May 2010 20:00:22 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:64079 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752604Ab0ECAAT (ORCPT ); Sun, 2 May 2010 20:00:19 -0400 Received: by mail-bw0-f219.google.com with SMTP id 19so1032679bwz.21 for ; Sun, 02 May 2010 17:00:18 -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=PgiYcsfWEnjNZ5vGaXiJmq8lLqkGe0I6WHHuoDNuD6M=; b=A6gQCPlySph8OfTENH+yhG+0kNNF3PJg8O+TGW4dY4vkUhqMaasAPu6GKI9zpNFiPo 094APsikoX7hEK7ebitLUu3sJOGDh3FckMs0ybJHo1nScXOHRtQPnD3UlZG07j87eFhP /2bBVp1cS4ftuX9j6ageuurPtlYxv6uQv3DyM= 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=J6rhf4Y6tA8M+6XA+PbOZ0ONzAoo1Grv1nSIFxMnkh/bgtjvWILbvgWSLexiv5AVH8 yuMcqyl6FSUT7AX3+DTTSaM7oL2apc1wl3hUxQkUFeCvOJ9poqKTqbO1Ou3q55vJM6K5 37YCWeKr4GkAMtGCF9Spj04IOXxTRfxYtvry0= Received: by 10.204.134.87 with SMTP id i23mr1703739bkt.125.1272844818729; Sun, 02 May 2010 17:00:18 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id 14sm1441435bwz.6.2010.05.02.17.00.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 02 May 2010 17:00:18 -0700 (PDT) From: Felipe Contreras To: linux-omap Cc: Tony Lindgren , Hiroshi Doyu , Ohad Ben-Cohen , Felipe Contreras Subject: [RFC/PATCH 2/8] omap: mailbox: reorganize structures Date: Mon, 3 May 2010 02:59:52 +0300 Message-Id: <1272844798-25330-3-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1272844798-25330-1-git-send-email-felipe.contreras@gmail.com> References: <1272844798-25330-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]); Mon, 03 May 2010 00:00:33 +0000 (UTC) diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 7263b9b..252e53b 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -262,6 +262,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 = { @@ -279,8 +280,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), @@ -304,13 +337,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), @@ -334,30 +360,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;