From patchwork Fri May 14 15:01:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 99626 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 o4EF2CBh031725 for ; Fri, 14 May 2010 15:02:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754771Ab0ENPCL (ORCPT ); Fri, 14 May 2010 11:02:11 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:44846 "EHLO mail-ew0-f216.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753764Ab0ENPCJ (ORCPT ); Fri, 14 May 2010 11:02:09 -0400 Received: by mail-ew0-f216.google.com with SMTP id 8so902320ewy.28 for ; Fri, 14 May 2010 08:02:08 -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=GXMRUMy3dOdfjAQLqSrGO5vb8EDDxe8o0ZmHhvSH1w8=; b=ciZyiIUcxRee+Oxmg0inNO8LzQo3eR2lkFUlieMH2LJ/GeEWJ1DsFcjeZpkkVJQ9F0 LD6pg+EKROMJ0CCMPlfExKzXImfLxp7u9oGeVOxFxMCh/G4lAihey0MednseJfQSqMPb ESSEvxWr32xzvjgbD0LQPiIcDGTsD+AISNi7k= 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=IpOY4CC/RKUoRxk94XoRho7aGKrYqA70oS7+eTBvHqKYOSTZ89HRPkp1vknoLxBQFV 5WN3WtjRs6mLOWXhiIm+7+KmoWpShCEBEgcXRD8R2BTDnoStyFIU+ZevxDw7m7VvxfDc CSzN3J9dNC82Nr4EEOsov8vDMbodmbit/C8Bc= Received: by 10.213.43.66 with SMTP id v2mr404156ebe.97.1273849328862; Fri, 14 May 2010 08:02:08 -0700 (PDT) Received: from localhost ([192.100.124.156]) by mx.google.com with ESMTPS id 15sm1309976ewy.12.2010.05.14.08.02.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 14 May 2010 08:02:07 -0700 (PDT) From: Felipe Contreras To: linux-omap Cc: linux-arm , Hiroshi Doyu , Tony Lindgren , Russell King , Felipe Contreras Subject: [PATCH v2 03/17] omap: mailbox: reorganize structures Date: Fri, 14 May 2010 18:01:36 +0300 Message-Id: <1273849310-32169-4-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1273849310-32169-1-git-send-email-felipe.contreras@gmail.com> References: <1273849310-32169-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, 14 May 2010 15:02:12 +0000 (UTC) diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index c9f3d39..7d42034 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;