From patchwork Sun May 2 23:59:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 96393 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 o4300JL2005691 for ; Mon, 3 May 2010 00:00:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753963Ab0ECAAZ (ORCPT ); Sun, 2 May 2010 20:00:25 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:34449 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752604Ab0ECAAY (ORCPT ); Sun, 2 May 2010 20:00:24 -0400 Received: by mail-bw0-f219.google.com with SMTP id 19so1032682bwz.21 for ; Sun, 02 May 2010 17:00:24 -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=KV2KNp0NpGoyfuRrVjvQeIKHWJgFGEmae7ygM3VH104=; b=n+SPg04tCIeKPADDoLY9gnyliCVyKn/JFKvSgjVWUvHtkg0fli3kQG58LH63pTjhVS Y6evOo28groWV7IxIKmZR0KsxGCrWTk7ChQ7OyRhH2vunl8adlFtYc1MOheRJ7QmwoNm S2Fb4YvHQmyfzQz3Pt948oAjbYI9A70tSBXSQ= 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=dSRq7HmvX2v2xmYsSmtW6yNibsnFpB57+nDybjo/mZ2VmM5FsaVC2W1LV/F6xDIxbI wpTsoWAkPkxuXymI5FYRUorqneE5wFAI3StldBw+q2Vvu1aNhqTZFEqKykZvb5ySHZPX EXtNYQs/VVpvvnmG1yCDSeAeOK3G4dRMDkcS4= Received: by 10.204.152.17 with SMTP id e17mr1549004bkw.105.1272844823938; Sun, 02 May 2010 17:00:23 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id 14sm1467731bwz.10.2010.05.02.17.00.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 02 May 2010 17:00:23 -0700 (PDT) From: Felipe Contreras To: linux-omap Cc: Tony Lindgren , Hiroshi Doyu , Ohad Ben-Cohen , Felipe Contreras Subject: [RFC/PATCH 3/8] omap: mailbox: 2420 should be detected at run-time Date: Mon, 3 May 2010 02:59:53 +0300 Message-Id: <1272844798-25330-4-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:35 +0000 (UTC) diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 252e53b..a328664 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -287,8 +287,6 @@ struct omap_mbox mbox_dsp_info = { }; EXPORT_SYMBOL(mbox_dsp_info); -#if defined(CONFIG_ARCH_OMAP2420) - /* IVA */ static struct omap_mbox2_priv omap2_mbox_iva_priv = { .tx_fifo = { @@ -311,7 +309,6 @@ static struct omap_mbox mbox_iva_info = { .ops = &omap2_mbox_ops, .priv = &omap2_mbox_iva_priv, }; -#endif /* OMAP4 */ static struct omap_mbox2_priv omap2_mbox_1_priv = { @@ -401,7 +398,6 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) goto err_dsp; } } -#if defined(CONFIG_ARCH_OMAP2420) /* IVA */ if (cpu_is_omap2420()) { /* IVA IRQ */ res = platform_get_resource(pdev, IORESOURCE_IRQ, 1); @@ -415,13 +411,10 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) if (ret) goto err_iva1; } -#endif return 0; -#if defined(CONFIG_ARCH_OMAP2420) /* IVA */ err_iva1: omap_mbox_unregister(&mbox_dsp_info); -#endif err_dsp: iounmap(mbox_base); @@ -430,9 +423,8 @@ err_dsp: static int __devexit omap2_mbox_remove(struct platform_device *pdev) { -#if defined(CONFIG_ARCH_OMAP2420) - omap_mbox_unregister(&mbox_iva_info); -#endif + if (cpu_is_omap2420()) + omap_mbox_unregister(&mbox_iva_info); if (cpu_is_omap44xx()) { omap_mbox_unregister(&mbox_2_info);