From patchwork Tue Jul 2 09:28:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2811521 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 0FE719F3EB for ; Tue, 2 Jul 2013 09:35:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF77D20153 for ; Tue, 2 Jul 2013 09:35:05 +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 F10B320152 for ; Tue, 2 Jul 2013 09:35:03 +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 1UtwuT-0002uG-Go; Tue, 02 Jul 2013 09:30:09 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Utwsy-0002kC-MK; Tue, 02 Jul 2013 09:28:32 +0000 Received: from mail-pb0-x231.google.com ([2607:f8b0:400e:c01::231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Utwsx-0002hx-5Z for linux-arm-kernel@lists.infradead.org; Tue, 02 Jul 2013 09:28:31 +0000 Received: by mail-pb0-f49.google.com with SMTP id jt11so5856560pbb.8 for ; Tue, 02 Jul 2013 02:28:09 -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=smvB2KngfRjWzfsjpTRT+IQx6lYydj5czvaqUfKTnm0=; b=w0zFegmwAcDTtLlIA+BqRE6w5anYDzvdH+Q9RE/w48rkhHleTBAvbui+VEdm5uJWot 6bjD4TbivNAnSMNudBNwbRAU4dUajxN+ABZhhVtQfMg2cipanErIXekoaZ68BycdPg0W NsmCbURcyqZEApg9Rc1n/07cVHxJwxuGDO1hJQwAyVuUYFN0mos8G3E/qgal5q6w5Bki PCmKFMfT2mnMYEmjwkR9jdgwLc25pT5G3RQQ2YQYlbM3ou7c3m2QxFlaQrd/Q49G8XV3 tzd8GM4GqOXVNw0UnCyHDAF9fPnOHo8tb78tdoyFVBJgEeJXO1t/4mAgjyo1paoLKgwZ 1UwA== X-Received: by 10.66.233.168 with SMTP id tx8mr2902614pac.80.1372757289729; Tue, 02 Jul 2013 02:28:09 -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 tr3sm13269726pbc.3.2013.07.02.02.28.08 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Jul 2013 02:28:09 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Tue, 02 Jul 2013 18:28:14 +0900 Message-Id: <20130702092814.32066.30138.sendpatchset@w520> In-Reply-To: <20130702092725.32066.54861.sendpatchset@w520> References: <20130702092725.32066.54861.sendpatchset@w520> Subject: [PATCH 06/08] ARM: shmobile: Use DT for SMP on EMEV2 and KZM9D X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130702_052831_298672_8196A5D7 X-CRM114-Status: UNSURE ( 9.28 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: arnd@arndb.de, Magnus Damm , horms@verge.net.au, olof@lixom.net, shinya.kuribayashi.px@renesas.com, 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=ham 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 Rework the EMEV2 SMP code to rely on DT for CPU information instead of reading out number of CPU cores from the SCU. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/smp-emev2.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) --- 0001/arch/arm/mach-shmobile/smp-emev2.c +++ work/arch/arm/mach-shmobile/smp-emev2.c 2013-07-02 15:09:53.000000000 +0900 @@ -38,9 +38,12 @@ static int __cpuinit emev2_boot_secondar static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) { + /* setup EMEV2 specific SCU base, enable */ + shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); scu_enable(shmobile_scu_base); /* Tell ROM loader about our vector (in headsmp-scu.S, headsmp.S) */ + emev2_clock_init(); /* need ioremapped SMU */ emev2_set_boot_vector(__pa(shmobile_boot_vector)); shmobile_boot_fn = virt_to_phys(shmobile_boot_scu); shmobile_boot_arg = (unsigned long)shmobile_scu_base; @@ -49,21 +52,7 @@ static void __init emev2_smp_prepare_cpu scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); } -static void __init emev2_smp_init_cpus(void) -{ - unsigned int ncores; - - /* setup EMEV2 specific SCU base */ - shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); - emev2_clock_init(); /* need ioremapped SMU */ - - ncores = shmobile_scu_base ? scu_get_core_count(shmobile_scu_base) : 1; - - shmobile_smp_init_cpus(ncores); -} - struct smp_operations emev2_smp_ops __initdata = { - .smp_init_cpus = emev2_smp_init_cpus, .smp_prepare_cpus = emev2_smp_prepare_cpus, .smp_boot_secondary = emev2_boot_secondary, };