From patchwork Fri Aug 9 09:47:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2841811 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 AFC419F314 for ; Fri, 9 Aug 2013 09:48:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1A102049C for ; Fri, 9 Aug 2013 09:48:35 +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 C427C20498 for ; Fri, 9 Aug 2013 09:48:34 +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 1V7jIx-0002gM-6Y; Fri, 09 Aug 2013 09:48:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jIr-00083T-B8; Fri, 09 Aug 2013 09:48:13 +0000 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jIn-00081V-Kt for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2013 09:48:10 +0000 Received: by mail-pd0-f171.google.com with SMTP id g10so353437pdj.16 for ; Fri, 09 Aug 2013 02:47:47 -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=V0AVsCsZkPZ38isjDqEsUJRIXHFa/L6oISP7MgZl6Oo=; b=Ocj/DMHSiW0/7Q/fvRlyFspcQKzofLVWCXovLq7xfnR7Ug0CWND+OFGj8iJGw3Ihcb QCmJlKOxuX2O/fuPVzEAJLeHlZ0UtfciAAxVtdfvpQqWc/COFb/Jv3+WBFlOTHBQ8SDe vjcpTxwcRI6RUfZjDRa0kSsmOe9xWr2nYgZ95XHdgRJdejH2GHmInzeaRW9BWZIyBDVZ UQ8ksbMILSD1rX1eUPQHml7NBCp9p9WAR9yMslbv6dHa16QQwu4F/DXqTiOJGAdd1vl1 ZNGUmYMtJhw6wzkec5W1lZnU7VwjHDCqeEPp/arsEQ0HaEpKlnAqbNOS7ZBKg0OIskvx ehdQ== X-Received: by 10.68.52.200 with SMTP id v8mr10729529pbo.48.1376041667434; Fri, 09 Aug 2013 02:47:47 -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 7sm21549569paf.22.2013.08.09.02.47.44 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 02:47:45 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Fri, 09 Aug 2013 18:47:59 +0900 Message-Id: <20130809094759.6530.27408.sendpatchset@w520> In-Reply-To: <20130809094748.6530.16511.sendpatchset@w520> References: <20130809094748.6530.16511.sendpatchset@w520> Subject: [PATCH 01/14] ARM: shmobile: r8a7779: Remove ->init_machine() special case X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130809_054809_815512_3516CBCB X-CRM114-Status: GOOD ( 11.66 ) X-Spam-Score: -2.0 (--) Cc: olof@lixom.net, horms@verge.net.au, Magnus Damm , arnd@arndb.de, linux-arm-kernel@lists.infradead.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: , 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 r8a7779 ->init_machine(), so get rid of undesired clock setup from the generic long term r8a7779 DT support code. Rework the code to let r8a7779_add_dt_devices() act like other SoCs and make the board DT reference code setup clocks for us. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/board-marzen-reference.c | 7 ++++++- arch/arm/mach-shmobile/include/mach/r8a7779.h | 2 +- arch/arm/mach-shmobile/setup-r8a7779.c | 18 ++++++------------ 3 files changed, 13 insertions(+), 14 deletions(-) --- 0001/arch/arm/mach-shmobile/board-marzen-reference.c +++ work/arch/arm/mach-shmobile/board-marzen-reference.c 2013-08-08 15:02:44.000000000 +0900 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include @@ -27,7 +28,11 @@ static void __init marzen_init(void) { - r8a7779_add_standard_devices_dt(); + /* clocks are setup late during boot in the case of DT */ + r8a7779_clock_init(); + + r8a7779_add_dt_devices(); + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } static const char *marzen_boards_compat_dt[] __initdata = { --- 0001/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ work/arch/arm/mach-shmobile/include/mach/r8a7779.h 2013-08-08 14:59:50.000000000 +0900 @@ -30,7 +30,7 @@ extern void r8a7779_map_io(void); extern void r8a7779_earlytimer_init(void); extern void r8a7779_add_early_devices(void); extern void r8a7779_add_standard_devices(void); -extern void r8a7779_add_standard_devices_dt(void); +extern void r8a7779_add_dt_devices(void); extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata); extern void r8a7779_init_late(void); extern void r8a7779_clock_init(void); --- 0001/arch/arm/mach-shmobile/setup-r8a7779.c +++ work/arch/arm/mach-shmobile/setup-r8a7779.c 2013-08-08 15:03:05.000000000 +0900 @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -624,6 +623,12 @@ static struct platform_device *r8a7779_s &sata_device, }; +void __init r8a7779_add_dt_devices(void) +{ + platform_add_devices(r8a7779_devices_dt, + ARRAY_SIZE(r8a7779_devices_dt)); +} + void __init r8a7779_add_standard_devices(void) { #ifdef CONFIG_CACHE_L2X0 @@ -726,16 +731,6 @@ void __init r8a7779_init_delay(void) shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ } -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_devices_dt, - ARRAY_SIZE(r8a7779_devices_dt)); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); -} - static const char *r8a7779_compat_dt[] __initdata = { "renesas,r8a7779", NULL, @@ -746,7 +741,6 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8 .init_early = r8a7779_init_delay, .nr_irqs = NR_IRQS_LEGACY, .init_irq = r8a7779_init_irq_dt, - .init_machine = r8a7779_add_standard_devices_dt, .init_late = r8a7779_init_late, .dt_compat = r8a7779_compat_dt, MACHINE_END