From patchwork Fri Aug 9 09:48:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2841824 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 25DC8BF546 for ; Fri, 9 Aug 2013 09:50:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 014DD20204 for ; Fri, 9 Aug 2013 09:50:12 +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 B2745201EB for ; Fri, 9 Aug 2013 09:50:10 +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 1V7jJi-0003CH-1F; Fri, 09 Aug 2013 09:49:07 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jJO-000877-52; Fri, 09 Aug 2013 09:48:46 +0000 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jJM-00084V-5u for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2013 09:48:44 +0000 Received: by mail-pa0-f49.google.com with SMTP id ld10so201079pab.8 for ; Fri, 09 Aug 2013 02:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=YF7JlFI7G3d8JeqG+CtQ6dhjT6FeEyEnmuOy1QKIFm8=; b=GXl+PeRE+jhY79EQgKfgh5e2wyifxJ9b4p2WM5/OOq/pmeDGppAxKn3x07cFFaeDLz BqCZJkTaEFNw1z2wk/SNT2J3sblUBreu7P7LquExn1nfZ7HDWvcsWz18BqdRXY/oKteG rl01pD78rASm781HF/QngY/RKYI/RhL94znvCzpPd7f7BY4FiwWdxPxYpJmpb/aW6vG3 lY1z0hPm0LRLdpicUrZW2FytPe2J3E3DuvUwtjcUuhHNI0dyQykEu0c/hf8tV75ql036 tEh6EeteH8FI4yo1nYitaM7SWEy2Zp9exqyiLSyE2YFAgf+RmZ0Rcz9NpceWzq4mEXaF C2Qg== X-Received: by 10.66.26.112 with SMTP id k16mr10521315pag.65.1376041701549; Fri, 09 Aug 2013 02:48:21 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id s5sm19162863pbo.38.2013.08.09.02.48.17 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 02:48:19 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Fri, 09 Aug 2013 18:48:32 +0900 Message-Id: <20130809094832.6530.9438.sendpatchset@w520> In-Reply-To: <20130809094748.6530.16511.sendpatchset@w520> References: <20130809094748.6530.16511.sendpatchset@w520> Subject: [PATCH 04/14] ARM: shmobile: sh73a0: Remove ->init_machine() special case X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130809_054844_313914_7021DF28 X-CRM114-Status: GOOD ( 14.49 ) X-Spam-Score: -2.0 (--) Cc: olof@lixom.net, horms@verge.net.au, Magnus Damm , linux-arm-kernel@lists.infradead.org, arnd@arndb.de 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, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Magnus Damm No need to special case sh73a0 ->init_machine(), so get rid of undesired cpufreq platform device from the generic long term sh73a0 DT support code. For short term support on KZM9D the DT reference implementation now adds a "cpufreq-cpu0" platform device so that can be used for development. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/board-kzm9g-reference.c | 9 ++++++++- arch/arm/mach-shmobile/include/mach/sh73a0.h | 2 +- arch/arm/mach-shmobile/setup-sh73a0.c | 23 ++++++----------------- 3 files changed, 15 insertions(+), 19 deletions(-) --- 0001/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ work/arch/arm/mach-shmobile/board-kzm9g-reference.c 2013-08-08 15:56:28.000000000 +0900 @@ -33,7 +33,14 @@ static void __init kzm_init(void) { - sh73a0_add_standard_devices_dt(); + /* clocks are setup late during boot in the case of DT */ + sh73a0_clock_init(); + + sh73a0_add_dt_devices(); + + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + + platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); #ifdef CONFIG_CACHE_L2X0 /* Early BRESP enable, Shared attribute override enable, 64K*8way */ --- 0001/arch/arm/mach-shmobile/include/mach/sh73a0.h +++ work/arch/arm/mach-shmobile/include/mach/sh73a0.h 2013-08-08 15:54:26.000000000 +0900 @@ -78,7 +78,7 @@ extern void sh73a0_map_io(void); extern void sh73a0_earlytimer_init(void); extern void sh73a0_add_early_devices(void); extern void sh73a0_add_standard_devices(void); -extern void sh73a0_add_standard_devices_dt(void); +extern void sh73a0_add_dt_devices(void); extern void sh73a0_clock_init(void); extern void sh73a0_pinmux_init(void); extern void sh73a0_pm_init(void); --- 0001/arch/arm/mach-shmobile/setup-sh73a0.c +++ work/arch/arm/mach-shmobile/setup-sh73a0.c 2013-08-08 15:57:42.000000000 +0900 @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -901,6 +900,12 @@ static struct platform_device *sh73a0_la #define SRCR2 IOMEM(0xe61580b0) +void __init sh73a0_add_dt_devices(void) +{ + platform_add_devices(sh73a0_devices_dt, + ARRAY_SIZE(sh73a0_devices_dt)); +} + void __init sh73a0_add_standard_devices(void) { /* Clear software reset bit on SY-DMAC module */ @@ -943,21 +948,6 @@ void __init sh73a0_add_early_devices(voi #ifdef CONFIG_USE_OF -void __init sh73a0_add_standard_devices_dt(void) -{ - struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, }; - - /* clocks are setup late during boot in the case of DT */ - sh73a0_clock_init(); - - platform_add_devices(sh73a0_devices_dt, - ARRAY_SIZE(sh73a0_devices_dt)); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); - - /* Instantiate cpufreq-cpu0 */ - platform_device_register_full(&devinfo); -} - static const char *sh73a0_boards_compat_dt[] __initdata = { "renesas,sh73a0", NULL, @@ -968,7 +958,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH7 .map_io = sh73a0_map_io, .init_early = sh73a0_init_delay, .nr_irqs = NR_IRQS_LEGACY, - .init_machine = sh73a0_add_standard_devices_dt, .dt_compat = sh73a0_boards_compat_dt, MACHINE_END #endif /* CONFIG_USE_OF */