From patchwork Thu Oct 3 05:17:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 2980971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 415EABFF0B for ; Thu, 3 Oct 2013 05:18:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 455FA202EB for ; Thu, 3 Oct 2013 05:18:29 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 18B4B20206 for ; Thu, 3 Oct 2013 05:18:28 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRbIG-0005Eu-II; Thu, 03 Oct 2013 05:17:44 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRbI5-0008IL-Mk; Thu, 03 Oct 2013 05:17:33 +0000 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRbHt-0008FO-G1 for linux-arm-kernel@lists.infradead.org; Thu, 03 Oct 2013 05:17:22 +0000 Received: from c-50-131-214-131.hsd1.ca.comcast.net ([50.131.214.131] helo=[127.0.0.1]) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1VRbHZ-00078f-P0; Thu, 03 Oct 2013 05:17:01 +0000 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 50.131.214.131 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+Ntd86r+TApbL+YHVJsphw Subject: [PATCH 2/6] ARM: OMAP2+: Add support for auxdata To: linux-arm-kernel@lists.infradead.org From: Tony Lindgren Date: Wed, 02 Oct 2013 22:17:00 -0700 Message-ID: <20131003051700.8444.10657.stgit@localhost> In-Reply-To: <20131003051049.8444.16913.stgit@localhost> References: <20131003051049.8444.16913.stgit@localhost> User-Agent: StGit/0.16-1-ga54b MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131003_011721_649669_CF787885 X-CRM114-Status: GOOD ( 12.38 ) X-Spam-Score: -1.9 (-) Cc: linux-omap@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For few things we're still going to be needing platform data for device tree based drivers. Let's set up auxdata handling and do it in pdata-quirks.c so we have all the legacy calls in one place. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-generic.c | 5 +---- arch/arm/mach-omap2/common.h | 3 ++- arch/arm/mach-omap2/pdata-quirks.c | 11 ++++++++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index a66575f..3017a9d 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -35,10 +35,7 @@ static struct of_device_id omap_dt_match_table[] __initdata = { static void __init omap_generic_init(void) { - omap_sdrc_init(NULL, NULL); - - of_platform_populate(NULL, omap_dt_match_table, NULL, NULL); - pdata_quirks_init(); + pdata_quirks_init(omap_dt_match_table); } #ifdef CONFIG_SOC_OMAP2420 diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index fd059e0..c6aebf0 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -288,7 +288,8 @@ static inline void omap4_cpu_resume(void) #endif -void pdata_quirks_init(void); +void pdata_quirks_init(struct of_device_id *); +void omap_pcs_legacy_init(int irq, void (*rearm)(void)); struct omap_sdrc_params; extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 3d472db..c739631 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "common.h" @@ -99,6 +100,10 @@ static void __init omap5_uevm_legacy_init(void) } #endif +struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { + { /* sentinel */ }, +}; + static struct pdata_init pdata_quirks[] __initdata = { #ifdef CONFIG_ARCH_OMAP3 { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, @@ -114,10 +119,14 @@ static struct pdata_init pdata_quirks[] __initdata = { { /* sentinel */ }, }; -void __init pdata_quirks_init(void) +void __init pdata_quirks_init(struct of_device_id *omap_dt_match_table) { struct pdata_init *quirks = pdata_quirks; + omap_sdrc_init(NULL, NULL); + of_platform_populate(NULL, omap_dt_match_table, + omap_auxdata_lookup, NULL); + while (quirks->compatible) { if (of_machine_is_compatible(quirks->compatible)) { if (quirks->fn)