From patchwork Sat Apr 30 02:08:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 743032 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3U28ljw027707 for ; Sat, 30 Apr 2011 02:09:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760111Ab1D3CJN (ORCPT ); Fri, 29 Apr 2011 22:09:13 -0400 Received: from mail-yi0-f46.google.com ([209.85.218.46]:63443 "EHLO mail-yi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754379Ab1D3CJM (ORCPT ); Fri, 29 Apr 2011 22:09:12 -0400 Received: by mail-yi0-f46.google.com with SMTP id 27so1491468yia.19 for ; Fri, 29 Apr 2011 19:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=UVBAH0QanNojKGHmQ9UrwHOOiqcjlDcJRaAmR0kAZeE=; b=LilAlQEoAt4hEN3m/P2m1XV6z0O7I93Sx6hsNRx9J2jpw6fNwwyF00Vw8Dwj+3MaD9 gYkDl1iVVq5RkWi+JwNIc+QdOSm4KZVVNCYY4N2P098M5b3RICinfMVEWLvaJHg95Qfz R8Tf2P2/qHQ/4F+8jNCEfliJWwyHNwmBUpzOQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=AUr79JnuCNxMzfFj7yF+vYDQhdJQazUDd7FTcRA+Gw6JzulJzM156i97KNz9Lr2M9Z aTQ0okBDvz2hUTB4XqmaBi9+aN8LPY7WZ0gf7vvLAGy4FTTKHNRe9898vQ1eYXpkrIKv Ela37Y6RxTEo+9PcNwrOYJjlNXW98V7e5HAmE= Received: by 10.91.198.11 with SMTP id a11mr4655859agq.184.1304129352533; Fri, 29 Apr 2011 19:09:12 -0700 (PDT) Received: from rob-laptop.grandecom.net (65-36-74-215.dyn.grandenetworks.net [65.36.74.215]) by mx.google.com with ESMTPS id w6sm3345086anf.32.2011.04.29.19.09.10 (version=SSLv3 cipher=OTHER); Fri, 29 Apr 2011 19:09:11 -0700 (PDT) From: Rob Herring To: linux-arm-msm@vger.kernel.org, linux-sh@vger.kernel.org, Srinidhi Kasagar , Linus Walleij , Russell King , David Brown , Daniel Walker , Paul Mundt , linux-arm-kernel@lists.infradead.org Cc: Rob Herring Subject: [PATCH 09/10] ARM: shmobile: use common scu_init_cpus Date: Fri, 29 Apr 2011 21:08:16 -0500 Message-Id: <1304129297-6614-10-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1304129297-6614-1-git-send-email-robherring2@gmail.com> References: <1304129297-6614-1-git-send-email-robherring2@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 30 Apr 2011 02:09:14 +0000 (UTC) From: Rob Herring Convert shmobile to use common scu_init_cpus function. Signed-off-by: Rob Herring --- arch/arm/mach-shmobile/include/mach/common.h | 2 +- arch/arm/mach-shmobile/platsmp.c | 15 ++------------- arch/arm/mach-shmobile/smp-sh73a0.c | 6 ++---- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 013ac0e..6401490 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -41,7 +41,7 @@ extern void sh73a0_pinmux_init(void); extern struct clk sh73a0_extal1_clk; extern struct clk sh73a0_extal2_clk; -extern unsigned int sh73a0_get_core_count(void); +extern void sh73a0_smp_init_cpus(void); extern void sh73a0_secondary_init(unsigned int cpu); extern int sh73a0_boot_secondary(unsigned int cpu); extern void sh73a0_smp_prepare_cpus(void); diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c index 65e879b..c681333 100644 --- a/arch/arm/mach-shmobile/platsmp.c +++ b/arch/arm/mach-shmobile/platsmp.c @@ -20,14 +20,6 @@ #include #include -static unsigned int __init shmobile_smp_get_core_count(void) -{ - if (machine_is_ag5evm()) - return sh73a0_get_core_count(); - - return 1; -} - static void __init shmobile_smp_prepare_cpus(void) { if (machine_is_ag5evm()) @@ -52,11 +44,8 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) void __init smp_init_cpus(void) { - unsigned int ncores = shmobile_smp_get_core_count(); - unsigned int i; - - for (i = 0; i < ncores; i++) - set_cpu_possible(i, true); + if (machine_is_ag5evm()) + sh73a0_smp_init_cpus(); } void __init platform_smp_prepare_cpus(unsigned int max_cpus) diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index a156d21..018a24f 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c @@ -55,11 +55,9 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) __raw_writel(tmp, scu_base + 8); } -unsigned int __init sh73a0_get_core_count(void) +void __init sh73a0_smp_init_cpus(void) { - void __iomem *scu_base = scu_base_addr(); - - return scu_get_core_count(scu_base); + scu_init_cpus(scu_base_addr()); } void __cpuinit sh73a0_secondary_init(unsigned int cpu)