From patchwork Fri Aug 9 09:49:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2841856 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 422BDBF546 for ; Fri, 9 Aug 2013 10:25:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A07D20374 for ; Fri, 9 Aug 2013 10:25:55 +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 36E3520345 for ; Fri, 9 Aug 2013 10:25:54 +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 1V7jLV-0004Tg-7e; Fri, 09 Aug 2013 09:51:00 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jKk-0008Gq-MV; Fri, 09 Aug 2013 09:50:10 +0000 Received: from mail-pd0-x231.google.com ([2607:f8b0:400e:c02::231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7jKY-0008Ch-Mz for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2013 09:50:00 +0000 Received: by mail-pd0-f177.google.com with SMTP id y10so353005pdj.36 for ; Fri, 09 Aug 2013 02:49:37 -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=f1tvM5bTLUglHfo+z+z0bqd40sqYn/6fIa26iKCau/Y=; b=FPutkmkrCrTBHZv9ly5wlcMtq1k4fQEN9ZynNkA9t0M+9ReiWF4hkaMGA7Y7DJLLkZ O74JEzNVuOTav2UAfMM9MZYP2nQVfdD8Qm0L3+GzlM4U1wSwnvMZeeuNZOmmES7wrcIl SJBumaYNN4QmvP+QWVW0uTQxyR4hnHqOlEPpiBinpZ3jLwrtiPKzzY220BnRUClO2/hf 5GrunnUo3EHI2HINL/NzJi7TvPK+pujb9FUxhkrjSyJL5pSUHoJlg+VPtc6daSUrWTE3 f74b6UO4bfJGsQcPM0X2ySTI4dISCIP/Xr6HWRPK5JGx/tfIs35XKCdGiJ0/vcqRMt9H HleA== X-Received: by 10.66.251.40 with SMTP id zh8mr10553050pac.185.1376041777015; Fri, 09 Aug 2013 02:49:37 -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 7sm21558196paf.22.2013.08.09.02.49.33 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 02:49:35 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Fri, 09 Aug 2013 18:49:48 +0900 Message-Id: <20130809094948.6530.299.sendpatchset@w520> In-Reply-To: <20130809094748.6530.16511.sendpatchset@w520> References: <20130809094748.6530.16511.sendpatchset@w520> Subject: [PATCH 11/14] ARM: shmobile: Rename to r8a7779_init_early(), use smp_set_ops() X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130809_054958_925019_2762C5E3 X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. 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 Rename r8a7779_init_delay() into r8a7779_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 r8a7779 SoC code to install the smp ops from r8a7779_init_early(). The r8a7779_add_early_devices() function also gets updated to call r8a7779_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-marzen-reference.c | 3 +-- arch/arm/mach-shmobile/board-marzen.c | 1 - arch/arm/mach-shmobile/include/mach/r8a7779.h | 2 +- arch/arm/mach-shmobile/setup-r8a7779.c | 17 +++++++++++------ 4 files changed, 13 insertions(+), 10 deletions(-) --- 0012/arch/arm/mach-shmobile/board-marzen-reference.c +++ work/arch/arm/mach-shmobile/board-marzen-reference.c 2013-08-08 16:25:43.000000000 +0900 @@ -41,9 +41,8 @@ static const char *marzen_boards_compat_ }; DT_MACHINE_START(MARZEN, "marzen") - .smp = smp_ops(r8a7779_smp_ops), .map_io = r8a7779_map_io, - .init_early = r8a7779_init_delay, + .init_early = r8a7779_init_early, .init_irq = r8a7779_init_irq_dt, .init_machine = marzen_init, .dt_compat = marzen_boards_compat_dt, --- 0001/arch/arm/mach-shmobile/board-marzen.c +++ work/arch/arm/mach-shmobile/board-marzen.c 2013-08-08 16:25:53.000000000 +0900 @@ -263,7 +263,6 @@ static const char *marzen_boards_compat_ }; DT_MACHINE_START(MARZEN, "marzen") - .smp = smp_ops(r8a7779_smp_ops), .map_io = r8a7779_map_io, .init_early = r8a7779_add_early_devices, .init_irq = r8a7779_init_irq_dt, --- 0004/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ work/arch/arm/mach-shmobile/include/mach/r8a7779.h 2013-08-08 16:26:58.000000000 +0900 @@ -23,7 +23,7 @@ static inline struct r8a7779_pm_ch *to_r return &container_of(d, struct r8a7779_pm_domain, genpd)->ch; } -extern void r8a7779_init_delay(void); +extern void r8a7779_init_early(void); extern void r8a7779_init_irq_extpin(int irlm); extern void r8a7779_init_irq_dt(void); extern void r8a7779_map_io(void); --- 0012/arch/arm/mach-shmobile/setup-r8a7779.c +++ work/arch/arm/mach-shmobile/setup-r8a7779.c 2013-08-08 16:29:06.000000000 +0900 @@ -663,8 +663,18 @@ void __init r8a7779_earlytimer_init(void r8a7779_register_twd(); } +void __init r8a7779_init_early(void) +{ + shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ +#ifdef CONFIG_SMP + smp_set_ops(&r8a7779_smp_ops); +#endif +} + void __init r8a7779_add_early_devices(void) { + r8a7779_init_early(); + early_platform_add_devices(r8a7779_devices_dt, ARRAY_SIZE(r8a7779_devices_dt)); @@ -726,11 +736,6 @@ void __init r8a7779_init_irq_dt(void) __raw_writel(0x003fee3f, INT2SMSKCR4); } -void __init r8a7779_init_delay(void) -{ - shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ -} - static const char *r8a7779_compat_dt[] __initdata = { "renesas,r8a7779", NULL, @@ -738,7 +743,7 @@ static const char *r8a7779_compat_dt[] _ DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)") .map_io = r8a7779_map_io, - .init_early = r8a7779_init_delay, + .init_early = r8a7779_init_early, .init_irq = r8a7779_init_irq_dt, .init_late = r8a7779_init_late, .dt_compat = r8a7779_compat_dt,