From patchwork Sun Dec 8 22:53:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Yanovich X-Patchwork-Id: 3307871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B9D239F1F0 for ; Sun, 8 Dec 2013 23:21:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF9322023F for ; Sun, 8 Dec 2013 23:21:41 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC03C20213 for ; Sun, 8 Dec 2013 23:21:40 +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 1VpnHQ-0003X0-M1; Sun, 08 Dec 2013 22:56:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VpnGd-0007pg-QT; Sun, 08 Dec 2013 22:56:03 +0000 Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VpnFj-0007in-6X for linux-arm-kernel@lists.infradead.org; Sun, 08 Dec 2013 22:55:08 +0000 Received: by mail-la0-f44.google.com with SMTP id ep20so1076421lab.3 for ; Sun, 08 Dec 2013 14:54:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GDzFAma4oqq603TJYrQDMPeOGkYl+asastr8mphoKmw=; b=WNMowgIyNOaYT2AebY2DYOBp46whdTjZbJJwjOID4eLbtmpFsyscKFDGCNKl23FjJF nDqy3APlUCNnefACHE6A5JAj4ES0WytxxzxIgPtMQUotc/elG+Rul9xInc/Guj5qa6Qh WIXNEVS/Col7kiBLfOT3Ev8oD4BDTeaz8rfIomPvwszjAxXDReAJ3uJwCmYmWDF9VGcr xuQrlRwW/6mfBrJMBjJNqE0mYkZ8VtWHRFp99k2sKu7OjvF90Zo6uU+Uf8Nhy26GDwFM r72CkzOyIl5KCfhHYJSbi4BdijzDUx9H8cYdIkv1FomqmuwuoqIIyiP+fj6NJbcQgf5k CGAA== X-Received: by 10.112.35.232 with SMTP id l8mr191122lbj.80.1386543284893; Sun, 08 Dec 2013 14:54:44 -0800 (PST) Received: from host5.omatika.ru (0893675324.static.corbina.ru. [95.31.1.192]) by mx.google.com with ESMTPSA id a8sm9892011lae.5.2013.12.08.14.54.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Dec 2013 14:54:44 -0800 (PST) From: Sergei Ianovich To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/9] ARM: dts: pxa27x: skip static platform devices Date: Mon, 9 Dec 2013 02:53:47 +0400 Message-Id: <1386543229-1542-8-git-send-email-ynvich@gmail.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1386543229-1542-1-git-send-email-ynvich@gmail.com> References: <1386348542-9584-1-git-send-email-ynvich@gmail.com> <1386543229-1542-1-git-send-email-ynvich@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131208_175507_458353_72E9BE1E X-CRM114-Status: GOOD ( 14.16 ) X-Spam-Score: -1.9 (-) Cc: Eric Miao , Arnd Bergmann , Haojian Zhuang , Daniel Mack , Sergei Ianovich , Russell King - ARM Linux 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: , MIME-Version: 1.0 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SBL, RP_MATCHES_RCVD, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no 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 Static plaform devices are created from postcore_initcall(). The status quo remains for non-device tree machines. Device tree machine now have a chance to prevent spawning of static devices by calling pxa27x_skip_init(). Signed-off-by: Sergei Ianovich CC: Russell King - ARM Linux CC: Daniel Mack CC: Arnd Bergmann --- arch/arm/mach-pxa/include/mach/pxa27x.h | 1 + arch/arm/mach-pxa/pxa27x.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/mach-pxa/include/mach/pxa27x.h b/arch/arm/mach-pxa/include/mach/pxa27x.h index 7cff640..d62fc8f 100644 --- a/arch/arm/mach-pxa/include/mach/pxa27x.h +++ b/arch/arm/mach-pxa/include/mach/pxa27x.h @@ -23,6 +23,7 @@ extern void __init pxa27x_map_io(void); extern void __init pxa27x_init_irq(void); extern int __init pxa27x_set_pwrmode(unsigned int mode); extern void pxa27x_cpu_pm_enter(suspend_state_t state); +extern void __init pxa27x_skip_init(void); #define pxa27x_handle_irq ichp_handle_irq diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 301471a..98dea3a 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -452,6 +452,13 @@ static struct platform_device *devices[] __initdata = { &pxa27x_device_pwm1, }; +static unsigned int skip_init; + +void __init pxa27x_skip_init(void) +{ + skip_init = 1; +} + static int __init pxa27x_init(void) { int ret = 0; @@ -471,6 +478,9 @@ static int __init pxa27x_init(void) register_syscore_ops(&pxa2xx_mfp_syscore_ops); register_syscore_ops(&pxa2xx_clock_syscore_ops); + if (skip_init) + return 0; + pxa_register_device(&pxa27x_device_gpio, &pxa27x_gpio_info); ret = platform_add_devices(devices, ARRAY_SIZE(devices)); }