From patchwork Sat May 22 17:14:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 101657 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 o4MHFCnN017302 for ; Sat, 22 May 2010 17:15:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755946Ab0EVRO7 (ORCPT ); Sat, 22 May 2010 13:14:59 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:50627 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755880Ab0EVRO5 (ORCPT ); Sat, 22 May 2010 13:14:57 -0400 Received: by fxm5 with SMTP id 5so1584923fxm.19 for ; Sat, 22 May 2010 10:14:56 -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=RQtlcB7Ez4FQXKhHFJk+h7ZDdl9KXwF8IwQ41l/JICw=; b=YlfJw8FF4ar6pZ+HbB5F3/u4SHS+9Kstq3KmMTkzfJ0bi9ovJQHzhSM/Zj3uS05IgN iRxva6A6mU+vtnC514+OiIFqBYhQ9k5ikkdBA4usFzUBlIgweFYuPk+M7TCM4zwgaNUM i0TEbxzewgjT5gr8rKRs8e2gQUbhjNnXwUVJY= 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=uU4jxQoxyCAQkrZ69UWVaJ1lr7bghe0YwX0NZkNh3upfNJiw6ZTUWt3cXImXodc6nt tfv8QeSRZx3XPJoC2i8jHZ4ULZIKG7mNQUkZsZsgxUBfJcdo/6GN2TDV6AzSXvXr2Xwq se1oEwH9zx2TkzlfBSZxCiQ58InmS7xV9N9T0= Received: by 10.204.152.140 with SMTP id g12mr789513bkw.130.1274548495966; Sat, 22 May 2010 10:14:55 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id d13sm10172596bkd.17.2010.05.22.10.14.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 22 May 2010 10:14:55 -0700 (PDT) From: Felipe Contreras To: linux-omap Cc: linux-arm , Hiroshi Doyu , Tony Lindgren , Felipe Contreras Subject: [PATCH v3 11/14] omap: mailbox: only compile for configured archs Date: Sat, 22 May 2010 20:14:22 +0300 Message-Id: <1274548465-20208-12-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1274548465-20208-1-git-send-email-felipe.contreras@gmail.com> References: <1274548465-20208-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]); Sat, 22 May 2010 17:15:15 +0000 (UTC) diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index f55fa84..1f0c5cd 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -286,6 +286,7 @@ static struct omap_mbox_ops omap2_mbox_ops = { /* FIXME: the following structs should be filled automatically by the user id */ +#if defined(CONFIG_ARCH_OMAP3430) || defined(CONFIG_ARCH_OMAP2420) /* DSP */ static struct omap_mbox2_priv omap2_mbox_dsp_priv = { .tx_fifo = { @@ -308,11 +309,13 @@ struct omap_mbox mbox_dsp_info = { .ops = &omap2_mbox_ops, .priv = &omap2_mbox_dsp_priv, }; +#endif +#if defined(CONFIG_ARCH_OMAP3430) struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL }; +#endif #if defined(CONFIG_ARCH_OMAP2420) - /* IVA */ static struct omap_mbox2_priv omap2_mbox_iva_priv = { .tx_fifo = { @@ -339,6 +342,7 @@ static struct omap_mbox mbox_iva_info = { struct omap_mbox *omap2_mboxes[] = { &mbox_iva_info, &mbox_dsp_info, NULL }; #endif +#if defined(CONFIG_ARCH_OMAP4) /* OMAP4 */ static struct omap_mbox2_priv omap2_mbox_1_priv = { .tx_fifo = { @@ -385,6 +389,7 @@ struct omap_mbox mbox_2_info = { }; struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL }; +#endif static int __devinit omap2_mbox_probe(struct platform_device *pdev) { @@ -394,11 +399,14 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) res = pdev->resource; - if (cpu_is_omap3430()) { + if (false); +#if defined(CONFIG_ARCH_OMAP3430) + else if (cpu_is_omap3430()) { list = omap3_mboxes; list[0]->irq = platform_get_irq_byname(pdev, "dsp"); } +#endif #if defined(CONFIG_ARCH_OMAP2420) else if (cpu_is_omap2420()) { list = omap2_mboxes; @@ -407,12 +415,14 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) list[1]->irq = platform_get_irq_byname(pdev, "iva"); } #endif +#if defined(CONFIG_ARCH_OMAP4) else if (cpu_is_omap44xx()) { list = omap4_mboxes; list[0]->irq = list[1]->irq = platform_get_irq_byname(pdev, "mbox"); } +#endif else { pr_err("%s: platform not supported\n", __func__); return -ENODEV;