From patchwork Tue Feb 19 02:56:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 2161191 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 0D6C93FDF1 for ; Tue, 19 Feb 2013 02:59:44 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U7dOc-0008WO-1j; Tue, 19 Feb 2013 02:57:30 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U7dNP-00082q-G9 for linux-arm-kernel@lists.infradead.org; Tue, 19 Feb 2013 02:56:18 +0000 Received: from ayumi.akashicho.tokyo.vergenet.net (p8120-ipbfp1001kobeminato.hyogo.ocn.ne.jp [118.10.137.120]) by kirsty.vergenet.net (Postfix) with ESMTP id 02DB325BF10; Tue, 19 Feb 2013 13:56:14 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 93ABDEDE060; Tue, 19 Feb 2013 11:56:12 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Subject: [PATCH 1/5] ARM: shmobile: r8a7779: Do not use early devices with DT reference Date: Tue, 19 Feb 2013 11:56:06 +0900 Message-Id: <1361242570-8867-2-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1361242570-8867-1-git-send-email-horms+renesas@verge.net.au> References: <1361242570-8867-1-git-send-email-horms+renesas@verge.net.au> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130218_215616_030429_BAE92475 X-CRM114-Status: GOOD ( 14.77 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [202.4.237.240 listed in list.dnswl.org] -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: 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 Do not initialise any early devices when using the minimal DT reference code. Only the delay needs to be initialised. Cc: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/include/mach/common.h | 2 +- arch/arm/mach-shmobile/setup-r8a7779.c | 25 +++++++++---------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 84dcaa4..98aecdf 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -58,12 +58,12 @@ extern void r8a7740_clock_init(u8 md_ck); extern void r8a7740_pinmux_init(void); extern void r8a7740_pm_init(void); +extern void r8a7779_init_delay(void); extern void r8a7779_init_irq(void); extern void r8a7779_init_irq_dt(void); extern void r8a7779_map_io(void); extern void r8a7779_earlytimer_init(void); extern void r8a7779_add_early_devices(void); -extern void r8a7779_add_early_devices_dt(void); extern void r8a7779_add_standard_devices(void); extern void r8a7779_add_standard_devices_dt(void); extern void r8a7779_clock_init(void); diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 922dd4d..b1f7a45 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c @@ -322,7 +322,7 @@ static struct platform_device i2c3_device = { .num_resources = ARRAY_SIZE(rcar_i2c3_res), }; -static struct platform_device *r8a7779_early_devices_dt[] __initdata = { +static struct platform_device *r8a7779_devices_dt[] __initdata = { &scif0_device, &scif1_device, &scif2_device, @@ -350,8 +350,8 @@ void __init r8a7779_add_standard_devices(void) r8a7779_init_pm_domains(); - platform_add_devices(r8a7779_early_devices_dt, - ARRAY_SIZE(r8a7779_early_devices_dt)); + platform_add_devices(r8a7779_devices_dt, + ARRAY_SIZE(r8a7779_devices_dt)); platform_add_devices(r8a7779_early_devices, ARRAY_SIZE(r8a7779_early_devices)); } @@ -368,8 +368,8 @@ void __init r8a7779_earlytimer_init(void) void __init r8a7779_add_early_devices(void) { - early_platform_add_devices(r8a7779_early_devices_dt, - ARRAY_SIZE(r8a7779_early_devices_dt)); + early_platform_add_devices(r8a7779_devices_dt, + ARRAY_SIZE(r8a7779_devices_dt)); early_platform_add_devices(r8a7779_early_devices, ARRAY_SIZE(r8a7779_early_devices)); @@ -391,16 +391,9 @@ void __init r8a7779_add_early_devices(void) } #ifdef CONFIG_USE_OF -void __init r8a7779_add_early_devices_dt(void) +void __init r8a7779_init_delay(void) { shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ - - early_platform_add_devices(r8a7779_early_devices_dt, - ARRAY_SIZE(r8a7779_early_devices_dt)); - - /* Early serial console setup is not included here. - * See comment in r8a7779_add_early_devices(). - */ } static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = { @@ -412,8 +405,8 @@ void __init r8a7779_add_standard_devices_dt(void) /* clocks are setup late during boot in the case of DT */ r8a7779_clock_init(); - platform_add_devices(r8a7779_early_devices_dt, - ARRAY_SIZE(r8a7779_early_devices_dt)); + platform_add_devices(r8a7779_devices_dt, + ARRAY_SIZE(r8a7779_devices_dt)); of_platform_populate(NULL, of_default_bus_match_table, r8a7779_auxdata_lookup, NULL); } @@ -425,7 +418,7 @@ static const char *r8a7779_compat_dt[] __initdata = { DT_MACHINE_START(SH73A0_DT, "Generic R8A7779 (Flattened Device Tree)") .map_io = r8a7779_map_io, - .init_early = r8a7779_add_early_devices_dt, + .init_early = r8a7779_init_delay, .nr_irqs = NR_IRQS_LEGACY, .init_irq = r8a7779_init_irq_dt, .init_machine = r8a7779_add_standard_devices_dt,