From patchwork Fri Aug 9 09:50:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2841860 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 69E79BF546 for ; Fri, 9 Aug 2013 10:32:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C88B20320 for ; Fri, 9 Aug 2013 10:32:57 +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 525A2202F7 for ; Fri, 9 Aug 2013 10:32:56 +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 1V7jLu-0004s6-Il; Fri, 09 Aug 2013 09:51:24 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jLB-0008JV-Um; Fri, 09 Aug 2013 09:50:37 +0000 Received: from mail-pb0-x229.google.com ([2607:f8b0:400e:c01::229]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jL7-0008HD-47 for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2013 09:50:34 +0000 Received: by mail-pb0-f41.google.com with SMTP id rp2so4505007pbb.28 for ; Fri, 09 Aug 2013 02:50:12 -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=byN4FbYWALO1IAmFeFs631DlNYQGaMoNmYVFbMRh/bM=; b=nAoMKbvS5jFCUZir4J9gui+btOD/AeWXxzwEUc9MCW1vKSKN7t60T3K9pEITxpnJv7 ykbEKSu6Fr0kbcTpFpL62Jqw3lVqV199Hq9xnswHuA5fzboXj5VO7jZsIAlE/EAAiyGd V2eDo1DHVyJjTmR0EXFRvrl5Yf4z7TdnIziu04wzXlzJs8/dBzr1c9GF0FKtLR4Dg2dC iHBhZ3cv3+7AuTE6Rt2ymXbdIeECcMPVnX5DjNcmrhkhkJiuVLEHYiYjLfPuDqobDgdr WfR+Usak0HE4p0TSxwHAeeKCRiE3nED7V8qm6tWP+xG0hagmaXw08/OracHVyVME/ylZ Fr6A== X-Received: by 10.66.149.231 with SMTP id ud7mr10849980pab.8.1376041812119; Fri, 09 Aug 2013 02:50:12 -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 lm2sm21603768pab.2.2013.08.09.02.50.06 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 02:50:09 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Fri, 09 Aug 2013 18:50:21 +0900 Message-Id: <20130809095021.6530.8841.sendpatchset@w520> In-Reply-To: <20130809094748.6530.16511.sendpatchset@w520> References: <20130809094748.6530.16511.sendpatchset@w520> Subject: [PATCH 14/14] ARM: shmobile: Rename to sh73a0_init_early(), use smp_set_ops() X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130809_055033_294516_2732E68B X-CRM114-Status: GOOD ( 10.90 ) 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 Rename sh73a0_init_delay() into sh73a0_init_early() to make the function name show that more than just delay setup will happen. Also, instead of specifying the smp ops in DT_MACHINE convert the sh73a0 SoC code to install the smp ops from sh73a0_init_early(). The sh73a0_add_early_devices() function also gets updated to call sh73a0_init_early(). This way the smp ops will be installed in both DT and C cases. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/board-kzm9g-reference.c | 3 +-- arch/arm/mach-shmobile/board-kzm9g.c | 1 - arch/arm/mach-shmobile/include/mach/sh73a0.h | 2 +- arch/arm/mach-shmobile/setup-sh73a0.c | 11 +++++++---- 4 files changed, 9 insertions(+), 8 deletions(-) --- 0011/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ work/arch/arm/mach-shmobile/board-kzm9g-reference.c 2013-08-09 17:44:10.000000000 +0900 @@ -54,9 +54,8 @@ static const char *kzm9g_boards_compat_d }; DT_MACHINE_START(KZM9G_DT, "kzm9g-reference") - .smp = smp_ops(sh73a0_smp_ops), .map_io = sh73a0_map_io, - .init_early = sh73a0_init_delay, + .init_early = sh73a0_init_early, .init_machine = kzm_init, .dt_compat = kzm9g_boards_compat_dt, MACHINE_END --- 0001/arch/arm/mach-shmobile/board-kzm9g.c +++ work/arch/arm/mach-shmobile/board-kzm9g.c 2013-08-09 17:44:01.000000000 +0900 @@ -904,7 +904,6 @@ static const char *kzm9g_boards_compat_d }; DT_MACHINE_START(KZM9G_DT, "kzm9g") - .smp = smp_ops(sh73a0_smp_ops), .map_io = sh73a0_map_io, .init_early = sh73a0_add_early_devices, .nr_irqs = NR_IRQS_LEGACY, --- 0010/arch/arm/mach-shmobile/include/mach/sh73a0.h +++ work/arch/arm/mach-shmobile/include/mach/sh73a0.h 2013-08-09 17:42:03.000000000 +0900 @@ -71,7 +71,7 @@ enum { #define SH73A0_PINT0_IRQ(irq) ((irq) + 700) #define SH73A0_PINT1_IRQ(irq) ((irq) + 732) -extern void sh73a0_init_delay(void); +extern void sh73a0_init_early(void); extern void sh73a0_init_irq(void); extern void sh73a0_map_io(void); extern void sh73a0_earlytimer_init(void); --- 0011/arch/arm/mach-shmobile/setup-sh73a0.c +++ work/arch/arm/mach-shmobile/setup-sh73a0.c 2013-08-09 17:43:43.000000000 +0900 @@ -919,9 +919,12 @@ void __init sh73a0_add_standard_devices( ARRAY_SIZE(sh73a0_late_devices)); } -void __init sh73a0_init_delay(void) +void __init sh73a0_init_early(void) { shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */ +#ifdef CONFIG_SMP + smp_set_ops(&sh73a0_smp_ops); +#endif } /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ @@ -929,7 +932,6 @@ void __init __weak sh73a0_register_twd(v void __init sh73a0_earlytimer_init(void) { - sh73a0_init_delay(); sh73a0_clock_init(); shmobile_earlytimer_init(); sh73a0_register_twd(); @@ -937,6 +939,8 @@ void __init sh73a0_earlytimer_init(void) void __init sh73a0_add_early_devices(void) { + sh73a0_init_early(); + early_platform_add_devices(sh73a0_devices_dt, ARRAY_SIZE(sh73a0_devices_dt)); early_platform_add_devices(sh73a0_early_devices, @@ -954,9 +958,8 @@ static const char *sh73a0_boards_compat_ }; DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") - .smp = smp_ops(sh73a0_smp_ops), .map_io = sh73a0_map_io, - .init_early = sh73a0_init_delay, + .init_early = sh73a0_init_early, .dt_compat = sh73a0_boards_compat_dt, MACHINE_END #endif /* CONFIG_USE_OF */