From patchwork Fri Dec 14 16:45:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 1879841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 255D740079 for ; Fri, 14 Dec 2012 16:52:16 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TjYRI-0004WT-He; Fri, 14 Dec 2012 16:48:44 +0000 Received: from moutng.kundenserver.de ([212.227.126.171]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TjYOS-0002bt-PD for linux-arm-kernel@lists.infradead.org; Fri, 14 Dec 2012 16:45:50 +0000 Received: from axis700.grange (dslb-094-220-155-091.pools.arcor-ip.net [94.220.155.91]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MFyty-1TxJUp38LO-00F2TW; Fri, 14 Dec 2012 17:45:34 +0100 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id A3107105E7; Fri, 14 Dec 2012 17:45:32 +0100 (CET) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1TjYOB-0001uA-V4; Fri, 14 Dec 2012 17:45:31 +0100 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Subject: [PATCH 5/7] ARM: sh7372: allow boards supporting booting with or without DT Date: Fri, 14 Dec 2012 17:45:29 +0100 Message-Id: <1355503531-7276-6-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1355503531-7276-1-git-send-email-g.liakhovetski@gmx.de> References: <1355503531-7276-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:WDFmn0TP/szAhGt8PINBax5wfz0bTIANlfJGN1F2bts Bxr65DpRxUM9cU4UgxLge3RxAxgF7LKHWLCEL8br3NxB3fNno5 VHN3zEck7TZDY7LCmrbJ88CSVN8YaJm8en5vvN6Nspz4m72odf By5hVUAlxIMvhbmBoQmvQf5xamtgY7PwhvXddYydMLSNzZbGOc jrFOyBSwAoDPnl9IAwGFFFlsE7hSKYpN7iTE97V6V6JI7hydHx TH02i+fG17lJk3Mj0aMiUnVDhA4QIw+rpdu3J56mOul82t2uBA +icxbw6T5INYIefC9RLe9klaHI/ZtZbXRGilVYU2W5AdMHZ43f FOQrS33shvgqnRTfFlPvZ7umMzRur/kxv8Ho5ww7IilYtAJSmo xZ+cT6fqikSzA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121214_114549_361061_536C4973 X-CRM114-Status: GOOD ( 12.10 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (g.liakhovetski[at]gmx.de) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.171 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: devicetree-discuss@lists.ozlabs.org, Simon Horman , Magnus Damm , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org For boards booting without DT no changes should be caused by this patch. When booting with DT, devices, whose drivers support DT probing, will not be registered. Signed-off-by: Guennadi Liakhovetski --- arch/arm/mach-shmobile/setup-sh7372.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index bbe6e2a..3e6bf3d 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c @@ -981,9 +981,12 @@ static struct platform_device *sh7372_early_devices[] __initdata = { &tmu01_device, }; -static struct platform_device *sh7372_late_devices[] __initdata = { +static struct platform_device *sh7372_late_devices_dt[] __initdata = { &iic0_device, &iic1_device, +}; + +static struct platform_device *sh7372_late_devices[] __initdata = { &dma0_device, &dma1_device, &dma2_device, @@ -1012,13 +1015,11 @@ void __init sh7372_add_standard_devices(void) { "A3SP", &scif4_device, }, { "A3SP", &scif5_device, }, { "A3SP", &scif6_device, }, - { "A3SP", &iic1_device, }, { "A3SP", &dma0_device, }, { "A3SP", &dma1_device, }, { "A3SP", &dma2_device, }, { "A3SP", &usb_dma0_device, }, { "A3SP", &usb_dma1_device, }, - { "A4R", &iic0_device, }, { "A4R", &veu0_device, }, { "A4R", &veu1_device, }, { "A4R", &veu2_device, }, @@ -1027,6 +1028,10 @@ void __init sh7372_add_standard_devices(void) { "A4R", &tmu00_device, }, { "A4R", &tmu01_device, }, }; + struct pm_domain_device domain_devices_dt[] = { + { "A3SP", &iic1_device, }, + { "A4R", &iic0_device, }, + }; sh7372_init_pm_domains(); @@ -1035,9 +1040,15 @@ void __init sh7372_add_standard_devices(void) platform_add_devices(sh7372_late_devices, ARRAY_SIZE(sh7372_late_devices)); + if (!of_have_populated_dt()) + platform_add_devices(sh7372_late_devices_dt, + ARRAY_SIZE(sh7372_late_devices_dt)); rmobile_add_devices_to_domains(domain_devices, ARRAY_SIZE(domain_devices)); + if (!of_have_populated_dt()) + rmobile_add_devices_to_domains(domain_devices_dt, + ARRAY_SIZE(domain_devices_dt)); } static void __init sh7372_earlytimer_init(void)